[clang-tools-extra] r194447 - Fixed moduleImport and ident callbacks. Fixed modules test. Added ident callback test. A better test for moduleExport is coming.
John Thompson
John.Thompson.JTSoftware at gmail.com
Mon Nov 11 19:12:18 PST 2013
Author: jtsoftware
Date: Mon Nov 11 21:12:18 2013
New Revision: 194447
URL: http://llvm.org/viewvc/llvm-project?rev=194447&view=rev
Log:
Fixed moduleImport and ident callbacks. Fixed modules test. Added ident callback test. A better test for moduleExport is coming.
Added:
clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp
Modified:
clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp
Modified: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp?rev=194447&r1=194446&r2=194447&view=diff
==============================================================================
--- clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp (original)
+++ clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp Mon Nov 11 21:12:18 2013
@@ -166,7 +166,7 @@ void PPCallbacksTracker::Ident(clang::So
const std::string &Str) {
beginCallback("Ident");
appendArgument("Loc", Loc);
- appendQuotedArgument("Str", Str);
+ appendArgument("Str", Str);
}
// Callback invoked when start reading any pragma directive.
@@ -527,7 +527,7 @@ void PPCallbacksTracker::appendArgument(
SS << ", ";
SS << "{"
<< "Name: " << Value[I].first->getName() << ", "
- << "Loc:" << getSourceLocationString(PP, Value[I].second) << "}";
+ << "Loc: " << getSourceLocationString(PP, Value[I].second) << "}";
}
SS << "]";
appendArgument(Name, SS.str());
Added: clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp?rev=194447&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp (added)
+++ clang-tools-extra/trunk/test/pp-trace/pp-trace-ident.cpp Mon Nov 11 21:12:18 2013
@@ -0,0 +1,10 @@
+// RUN: pp-trace -ignore FileChanged,MacroDefined %s -undef -target x86_64 -std=c++11 | FileCheck --strict-whitespace %s
+
+#ident "$Id$"
+
+// CHECK: ---
+// CHECK-NEXT: - Callback: Ident
+// CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-ident.cpp:3:2"
+// CHECK-NEXT: Str: "$Id$"
+// CHECK-NEXT: - Callback: EndOfMainFile
+// CHECK-NEXT: ...
Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp?rev=194447&r1=194446&r2=194447&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp (original)
+++ clang-tools-extra/trunk/test/pp-trace/pp-trace-modules.cpp Mon Nov 11 21:12:18 2013
@@ -1,11 +1,11 @@
// RUN: pp-trace -ignore FileChanged,MacroDefined %s -x objective-c++ -undef -target x86_64 -std=c++11 -fmodules -fcxx-modules -fmodules-cache-path=%t -I%S -I%S/Input | FileCheck --strict-whitespace %s
- at import Level1A;
+ at import Level1A;
-// CHECK: ---
-// CHECK-NEXT: - Callback: moduleImport
-// CHECK-NEXT: ImportLoc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:3:2"
-// CHECK-NEXT: Path: [{Name: Level1A, Loc:"{{.*}}{{[/\\]}}pp-trace-modules.cpp:3:9"}]
-// CHECK-NEXT: Imported: Level1A
-// CHECK-NEXT: - Callback: EndOfMainFile
-// CHECK-NEXT: ...
+// CHECK: ---
+// CHECK-NEXT: - Callback: moduleImport
+// CHECK-NEXT: ImportLoc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:3:2"
+// CHECK-NEXT: Path: [{Name: Level1A, Loc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:3:9"}]
+// CHECK-NEXT: Imported: Level1A
+// CHECK-NEXT: - Callback: EndOfMainFile
+// CHECK-NEXT: ...
More information about the cfe-commits
mailing list