summaryrefslogtreecommitdiffstats
path: root/clang/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
commit186534244257d989383051f5b1a7d89d3bc146c8 (patch)
treef5b34ecb84d285bfaf99e7fdbfeef1cbd401fc86 /clang/lib/Sema/SemaDecl.cpp
parent2ecfcbd2aa29b1272afa665ece9ddf6d69c4970a (diff)
downloadbcm5719-llvm-186534244257d989383051f5b1a7d89d3bc146c8.tar.gz
bcm5719-llvm-186534244257d989383051f5b1a7d89d3bc146c8.zip
Refactoring.
Move ErrorTrap from clang/Sema to clang/Basic as DiagnosticErrorTrap and use it in Scope. llvm-svn: 119763
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index ceec0016e9a..7c2a8fb105e 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud