diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-08-03 23:24:57 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-08-03 23:24:57 +0000 |
commit | fb50bf5a6f16fe2376f2b4276d40ec10ea0d538b (patch) | |
tree | 324e5ffaeac9d80b1b1eac8f5abeae5faa8c062a /clang/lib/Sema/Sema.h | |
parent | d673098480b7572fae5119f253755ccde5ad193d (diff) | |
download | bcm5719-llvm-fb50bf5a6f16fe2376f2b4276d40ec10ea0d538b.tar.gz bcm5719-llvm-fb50bf5a6f16fe2376f2b4276d40ec10ea0d538b.zip |
Per advice that Doug Gregor gave me several months ago, clean up the
implementation of '#pragma unused' by not constructing intermediate
DeclRefExprs, but instead do the name lookup directly. The
implementation is greatly simplified.
Along the way, degrade '#pragma unused(undeclaredvariable)' to a
warning instead of being a hard error. This implements:
<rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning)
llvm-svn: 78019
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r-- | clang/lib/Sema/Sema.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 0dbb9f81d1e..2a77f21a2d4 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -2953,7 +2953,8 @@ public: SourceLocation RParenLoc); /// ActOnPragmaUnused - Called on well-formed '#pragma unused'. - virtual void ActOnPragmaUnused(ExprTy **Exprs, unsigned NumExprs, + virtual void ActOnPragmaUnused(const Token *Identifiers, + unsigned NumIdentifiers, Scope *curScope, SourceLocation PragmaLoc, SourceLocation LParenLoc, SourceLocation RParenLoc); |