[clang-tools-extra] r236624 - Fixed infinite recursion bug.
John Thompson
John.Thompson.JTSoftware at gmail.com
Wed May 6 11:39:15 PDT 2015
Author: jtsoftware
Date: Wed May 6 13:39:15 2015
New Revision: 236624
URL: http://llvm.org/viewvc/llvm-project?rev=236624&view=rev
Log:
Fixed infinite recursion bug.
Modified:
clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
Modified: clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp?rev=236624&r1=236623&r2=236624&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp (original)
+++ clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp Wed May 6 13:39:15 2015
@@ -418,7 +418,7 @@ static std::string getMacroExpandedStrin
std::string Name = II->getName().str();
// Check for nexted macro references.
clang::MacroInfo *MacroInfo = PP.getMacroInfo(II);
- if (MacroInfo)
+ if (MacroInfo && (Name != MacroName))
Expanded += getMacroExpandedString(PP, Name, MacroInfo, nullptr);
else
Expanded += Name;
More information about the cfe-commits
mailing list