aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-19 00:19:12 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-19 00:19:12 +0000
commit9c4eb1f3438370355f51dc8c62f2ca4803e3338d (patch)
tree9b4231e0ed836c7d0595979369054ff8986db814 /lib/Sema/SemaDecl.cpp
parenta762514563bcbf52a016f7e6b6730cac035ac92c (diff)
Refactoring.
Move ErrorTrap from clang/Sema to clang/Basic as DiagnosticErrorTrap and use it in Scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119763 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 ceec0016e9..7c2a8fb105 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -696,7 +696,7 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) {
if (!D->getDeclName()) continue;
// Diagnose unused variables in this scope.
- if (S->getNumErrorsAtStart() == getDiagnostics().getNumErrors())
+ if (!S->hasErrorOccurred())
DiagnoseUnusedDecl(D);
// Remove this name from our lexical scope.