summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2016-06-16 21:39:55 +0000
committerOlivier Goffart <ogoffart@woboq.com>2016-06-16 21:39:55 +0000
commit119dad63bc5bd5ed46d2be2556af148264f9f62f (patch)
treec429aedfd355d9a720755666ec17314a24f6c998 /clang/lib/Sema/SemaDecl.cpp
parent12b22198417c1eb83780f0905d8e466c2d774380 (diff)
downloadbcm5719-llvm-119dad63bc5bd5ed46d2be2556af148264f9f62f.tar.gz
bcm5719-llvm-119dad63bc5bd5ed46d2be2556af148264f9f62f.zip
Keep invalid functions as part of the AST
Differential Revision: http://reviews.llvm.org/D19764 llvm-svn: 272962
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 18185b07dbe..49a650e2162 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -5100,10 +5100,9 @@ NamedDecl *Sema::HandleDeclarator(Scope *S, Declarator &D,
if (!New)
return nullptr;
- // If this has an identifier and is not an invalid redeclaration or
- // function template specialization, add it to the scope stack.
- if (New->getDeclName() && AddToScope &&
- !(D.isRedeclaration() && New->isInvalidDecl())) {
+ // If this has an identifier and is not a function template specialization,
+ // add it to the scope stack.
+ if (New->getDeclName() && AddToScope) {
// Only make a locally-scoped extern declaration visible if it is the first
// declaration of this entity. Qualified lookup for such an entity should
// only find this declaration if there is no visible declaration of it.
OpenPOWER on IntegriCloud