aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-20 02:04:01 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-20 02:04:01 +0000
commit44aa1f397855f130e88e62ffc1029f7f83bb5d2e (patch)
treec6d1de9b78b047e771056e04fb99c703752f3e6c /include/clang/Lex/Preprocessor.h
parent7663f396651716c82280f8fdcf97ad8e27c1ce5a (diff)
Revert r119838 "Don't warn for empty 'if' body if there is a macro that expands to nothing"
and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro. Thanks to Abramo Bagnara for the hint! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 2194d6fe62..261daed75b 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -47,7 +47,6 @@ class PPCallbacks;
class CodeCompletionHandler;
class DirectoryLookup;
class PreprocessingRecord;
-class PPMacroExpansionTrap;
/// Preprocessor - This object engages in a tight little dance with the lexer to
/// efficiently preprocess tokens. Lexers know only about tokens within a
@@ -111,11 +110,6 @@ class Preprocessor {
/// DisableMacroExpansion - True if macro expansion is disabled.
bool DisableMacroExpansion : 1;
- /// \brief This is set to true when a macro is expanded.
- /// Used by PPMacroExpansionTrap.
- bool MacroExpansionFlag : 1;
- friend class PPMacroExpansionTrap;
-
/// \brief Whether we have already loaded macros from the external source.
mutable bool ReadMacrosFromExternalSource : 1;
@@ -1035,17 +1029,6 @@ public:
virtual bool HandleComment(Preprocessor &PP, SourceRange Comment) = 0;
};
-/// \brief RAII class that determines when any macro expansion has occurred
-/// between the time the instance was created and the time it was
-/// queried.
-class PPMacroExpansionTrap {
- Preprocessor &PP;
-public:
- PPMacroExpansionTrap(Preprocessor &PP) : PP(PP) { reset(); }
- bool hasMacroExpansionOccured() const { return PP.MacroExpansionFlag; }
- void reset() { PP.MacroExpansionFlag = false; }
-};
-
} // end namespace clang
#endif