Skip to content
Snippets Groups Projects
Commit b8b07b17 authored by Ted Kremenek's avatar Ted Kremenek
Browse files

Handle 'UsingDirective' in CFGRecStmtDeclVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125491 91177308-0d34-0410-b5e6-96231b3b80d8
parent 1970d5fe
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,7 @@ public:
DISPATCH_CASE(Record) // FIXME: Refine. VisitStructDecl?
DISPATCH_CASE(CXXRecord)
DISPATCH_CASE(Enum)
DISPATCH_CASE(UsingDirective)
default:
assert(false && "Subtype of ScopedDecl not handled.");
}
......@@ -85,6 +86,7 @@ public:
DEFAULT_DISPATCH(ObjCMethod)
DEFAULT_DISPATCH(ObjCProtocol)
DEFAULT_DISPATCH(ObjCCategory)
DEFAULT_DISPATCH(UsingDirective)
void VisitCXXRecordDecl(CXXRecordDecl *D) {
static_cast<ImplClass*>(this)->VisitRecordDecl(D);
......
......@@ -225,3 +225,18 @@ void Foo3<T>::Bar() {
Baz();
value_();
}
//===---------------------------------------------------------------------===//
// Handle misc. C++ constructs.
//===---------------------------------------------------------------------===//
namespace fum {
int i = 3;
};
void test_namespace() {
// Previously triggered a crash.
using namespace fum;
int x = i;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment