]> granicus.if.org Git - clang/commit
Fixed a problem with #pragma push_macro/pop_macro implementation.
authorAlexander Kornienko <alexfh@google.com>
Wed, 29 Aug 2012 16:56:24 +0000 (16:56 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 29 Aug 2012 16:56:24 +0000 (16:56 +0000)
commite40c4238a572bf8241a04e0005f70550cbfc1cfb
treea8310655aa26021dd16b9b1eb053a3ac8e8bb190
parent260e5067f3cca1630c6ed88757a15b23622b52d1
Fixed a problem with #pragma push_macro/pop_macro implementation.

Summary:
The problem was with the following sequence:
  #pragma push_macro("long")
  #undef long
  #pragma pop_macro("long")
in case when "long" didn't represent a macro.
Fixed crash and removed code duplication for #undef/pop_macro case. Added regression tests.

Reviewers: doug.gregor, klimek

Reviewed By: doug.gregor

CC: cfe-commits, chapuni
Differential Revision: http://llvm-reviews.chandlerc.com/D31

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162845 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Lex/Preprocessor.h
lib/Lex/PPDirectives.cpp
lib/Lex/PPMacroExpansion.cpp
lib/Lex/Pragma.cpp
test/Preprocessor/pragma-pushpop-macro.c