[cfe-commits] r157089 - in /cfe/trunk: include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h test/Analysis/cxx11-crashes.cpp
Anna Zaks
ganna at apple.com
Fri May 18 17:22:11 PDT 2012
Author: zaks
Date: Fri May 18 19:22:11 2012
New Revision: 157089
URL: http://llvm.org/viewvc/llvm-project?rev=157089&view=rev
Log:
[analyzer] c++11: do not crash on namespace alias
Modified:
cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
cfe/trunk/test/Analysis/cxx11-crashes.cpp
Modified: cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h?rev=157089&r1=157088&r2=157089&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h (original)
+++ cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h Fri May 18 19:22:11 2012
@@ -69,6 +69,7 @@
DISPATCH_CASE(Field)
DISPATCH_CASE(UsingDirective)
DISPATCH_CASE(Using)
+ DISPATCH_CASE(NamespaceAlias)
default:
llvm_unreachable("Subtype of ScopedDecl not handled.");
}
@@ -90,6 +91,7 @@
DEFAULT_DISPATCH(ObjCCategory)
DEFAULT_DISPATCH(UsingDirective)
DEFAULT_DISPATCH(Using)
+ DEFAULT_DISPATCH(NamespaceAlias)
void VisitCXXRecordDecl(CXXRecordDecl *D) {
static_cast<ImplClass*>(this)->VisitRecordDecl(D);
Modified: cfe/trunk/test/Analysis/cxx11-crashes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/cxx11-crashes.cpp?rev=157089&r1=157088&r2=157089&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/cxx11-crashes.cpp (original)
+++ cfe/trunk/test/Analysis/cxx11-crashes.cpp Fri May 18 19:22:11 2012
@@ -10,3 +10,24 @@
fit0 = limitedFit ();
return fit0;
}
+
+// radar://11487541, NamespaceAlias
+namespace boost {namespace filesystem3 {
+class path {
+public:
+ path(){}
+};
+
+}}
+namespace boost
+{
+ namespace filesystem
+ {
+ using filesystem3::path;
+ }
+}
+
+void radar11487541() {
+ namespace fs = boost::filesystem;
+ fs::path p;
+}
More information about the cfe-commits
mailing list