summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-12-29 05:17:46 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-12-29 05:17:46 +0000
commita7e277784b3f61d19b96fb47acbb916fce58c772 (patch)
treebae7e669e380177c707d23c10be0c499d7167f27 /lib/Sema/SemaDecl.cpp
parent90dbab3d83bbfed9108e6f072d9251f8e28825f2 (diff)
Sema: Don't crash when solitary :: token appears before { in struct def
hasDeclaratorForAnonDecl, getDeclaratorForAnonDecl and getTypedefNameForAnonDecl are expected to handle the case where NamedDeclOrQualifier holds the wrong type or nothing at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 834f157e04..7264d82774 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -11790,7 +11790,7 @@ CreateNewDecl:
// CheckMemberSpecialization, below.
if (!isExplicitSpecialization &&
(TUK == TUK_Definition || TUK == TUK_Declaration) &&
- diagnoseQualifiedDeclaration(SS, DC, OrigName, NameLoc))
+ diagnoseQualifiedDeclaration(SS, DC, OrigName, Loc))
Invalid = true;
New->setQualifierInfo(SS.getWithLocInContext(Context));