summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-01-30 01:48:49 +0000
committerNico Weber <nicolasweber@gmx.de>2015-01-30 01:48:49 +0000
commit9cc795c1888be732d830919bac8612afb489b921 (patch)
treeb2a7672ff9b7dc483f5e26f1e53c6eba7376bed3 /clang/lib/Sema/SemaDecl.cpp
parent9745b3aae07a959e1284355e07d1ffbc0f5e33fc (diff)
downloadbcm5719-llvm-9cc795c1888be732d830919bac8612afb489b921.tar.gz
bcm5719-llvm-9cc795c1888be732d830919bac8612afb489b921.zip
Weaken an assertion that isn't true for invalid input.
llvm-svn: 227540
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index cd6ff6ce582..eb21dff766f 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -5578,8 +5578,9 @@ Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC,
}
}
} else {
- assert(D.getName().getKind() != UnqualifiedId::IK_TemplateId &&
- "should have a 'template<>' for this decl");
+ assert(
+ (Invalid || D.getName().getKind() != UnqualifiedId::IK_TemplateId) &&
+ "should have a 'template<>' for this decl");
}
if (IsVariableTemplateSpecialization) {
OpenPOWER on IntegriCloud