[clang-tools-extra] r178047 - Revised per review comments to rename test files and rearrange input files.

John Thompson John.Thompson.JTSoftware at gmail.com
Tue Mar 26 11:17:29 PDT 2013


Author: jtsoftware
Date: Tue Mar 26 13:17:28 2013
New Revision: 178047

URL: http://llvm.org/viewvc/llvm-project?rev=178047&view=rev
Log:
Revised per review comments to rename test files and rearrange input files.

Added:
    clang-tools-extra/trunk/test/modularize/Inputs/
    clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader1.h
    clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader2.h
    clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader1.h
    clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader2.h
    clang-tools-extra/trunk/test/modularize/Inputs/InconsistentSubHeader.h
    clang-tools-extra/trunk/test/modularize/Inputs/SomeDecls.h
    clang-tools-extra/trunk/test/modularize/Inputs/SomeTypes.h
    clang-tools-extra/trunk/test/modularize/NoProblems.modularize
    clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.modularize
    clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.modularize
Removed:
    clang-tools-extra/trunk/test/modularize/InputNoProblems/
    clang-tools-extra/trunk/test/modularize/InputProblemsDuplicate/
    clang-tools-extra/trunk/test/modularize/InputProblemsInconsistent/
    clang-tools-extra/trunk/test/modularize/NoProblems.cpp
    clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.cpp
    clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.cpp
Modified:
    clang-tools-extra/trunk/test/lit.cfg

Modified: clang-tools-extra/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/lit.cfg?rev=178047&r1=178046&r2=178047&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/lit.cfg (original)
+++ clang-tools-extra/trunk/test/lit.cfg Tue Mar 26 13:17:28 2013
@@ -32,7 +32,7 @@ execute_external = (platform.system() !=
 config.test_format = lit.formats.ShTest(execute_external)
 
 # suffixes: A list of file extensions to treat as test files.
-config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s']
+config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s', '.modularize']
 
 # test_source_root: The root path where tests are located.
 config.test_source_root = os.path.dirname(__file__)

Added: clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader1.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader1.h?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader1.h (added)
+++ clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader1.h Tue Mar 26 13:17:28 2013
@@ -0,0 +1,2 @@
+// Same decl as in DuplicateHeader2.h.
+typedef int TypeInt;

Added: clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader2.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader2.h?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader2.h (added)
+++ clang-tools-extra/trunk/test/modularize/Inputs/DuplicateHeader2.h Tue Mar 26 13:17:28 2013
@@ -0,0 +1,2 @@
+// Same decl as in DuplicateHeader1.h.
+typedef int TypeInt;

Added: clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader1.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader1.h?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader1.h (added)
+++ clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader1.h Tue Mar 26 13:17:28 2013
@@ -0,0 +1,4 @@
+// Define symbol such that a declaration exists when this header
+// is included, but not when InconsistentHeader2.h is included.
+#define SYMBOL1 1
+#include "InconsistentSubHeader.h"

Added: clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader2.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader2.h?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader2.h (added)
+++ clang-tools-extra/trunk/test/modularize/Inputs/InconsistentHeader2.h Tue Mar 26 13:17:28 2013
@@ -0,0 +1,3 @@
+// Set up so the declaration in InconsistentSubHeader.h is not defined.
+#define SYMBOL2 1
+#include "InconsistentSubHeader.h"

Added: clang-tools-extra/trunk/test/modularize/Inputs/InconsistentSubHeader.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/Inputs/InconsistentSubHeader.h?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/Inputs/InconsistentSubHeader.h (added)
+++ clang-tools-extra/trunk/test/modularize/Inputs/InconsistentSubHeader.h Tue Mar 26 13:17:28 2013
@@ -0,0 +1,11 @@
+// Set up so TypeInt only defined during InconsistentHeader1.h include.
+#ifdef SYMBOL1
+#define SYMBOL 1
+#endif
+#ifdef SYMBOL2
+#define SYMBOL 2
+#endif
+
+#if SYMBOL == 1
+typedef int TypeInt;
+#endif

Added: clang-tools-extra/trunk/test/modularize/Inputs/SomeDecls.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/Inputs/SomeDecls.h?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/Inputs/SomeDecls.h (added)
+++ clang-tools-extra/trunk/test/modularize/Inputs/SomeDecls.h Tue Mar 26 13:17:28 2013
@@ -0,0 +1,5 @@
+// Declare a couple of functions - no modules problems.
+
+void FuncOne();
+
+int FuncTwo(int arg);

Added: clang-tools-extra/trunk/test/modularize/Inputs/SomeTypes.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/Inputs/SomeTypes.h?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/Inputs/SomeTypes.h (added)
+++ clang-tools-extra/trunk/test/modularize/Inputs/SomeTypes.h Tue Mar 26 13:17:28 2013
@@ -0,0 +1,16 @@
+// Define a few different kinds of types - no modules problems.
+
+typedef int TypeInt;
+
+typedef TypeInt NestedTypeInt;
+
+struct TypeStruct {
+  int Member;
+};
+
+class TypeClass {
+public:
+  TypeClass() : Member(0) {}
+private:
+  int Member;
+};

Removed: clang-tools-extra/trunk/test/modularize/NoProblems.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/NoProblems.cpp?rev=178046&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/NoProblems.cpp (original)
+++ clang-tools-extra/trunk/test/modularize/NoProblems.cpp (removed)
@@ -1,5 +0,0 @@
-# RUN: modularize %s -x c++
-# RUN: modularize -prefix=%p %s -x c++
-
-InputNoProblems/SomeTypes.h
-InputNoProblems/SomeDecls.h

Added: clang-tools-extra/trunk/test/modularize/NoProblems.modularize
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/NoProblems.modularize?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/NoProblems.modularize (added)
+++ clang-tools-extra/trunk/test/modularize/NoProblems.modularize Tue Mar 26 13:17:28 2013
@@ -0,0 +1,5 @@
+# RUN: modularize %s -x c++
+# RUN: modularize -prefix=%p %s -x c++
+
+Inputs/SomeTypes.h
+Inputs/SomeDecls.h

Removed: clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.cpp?rev=178046&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.cpp (original)
+++ clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.cpp (removed)
@@ -1,6 +0,0 @@
-# RUN: modularize %s -x c++ 2>&1 | FileCheck %s
-
-InputProblemsDuplicate/Header1.h
-InputProblemsDuplicate/Header2.h
-
-# CHECK: error: 'TypeInt' defined at both {{.*}}{{[/\\]}}InputProblemsDuplicate{{[/\\]}}Header1.h:2:13 and {{.*}}{{[/\\]}}InputProblemsDuplicate{{[/\\]}}Header2.h:2:13

Added: clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.modularize
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.modularize?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.modularize (added)
+++ clang-tools-extra/trunk/test/modularize/ProblemsDuplicate.modularize Tue Mar 26 13:17:28 2013
@@ -0,0 +1,6 @@
+# RUN: modularize %s -x c++ 2>&1 | FileCheck %s
+
+Inputs/DuplicateHeader1.h
+Inputs/DuplicateHeader2.h
+
+# CHECK: error: 'TypeInt' defined at both {{.*}}{{[/\\]}}Inputs{{[/\\]}}DuplicateHeader1.h:2:13 and {{.*}}{{[/\\]}}Inputs{{[/\\]}}DuplicateHeader2.h:2:13

Removed: clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.cpp?rev=178046&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.cpp (original)
+++ clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.cpp (removed)
@@ -1,10 +0,0 @@
-# RUN: modularize %s -x c++ 2>&1 | FileCheck %s
-
-InputProblemsInconsistent/Header1.h
-InputProblemsInconsistent/Header2.h
-
-# CHECK: error: 'SYMBOL' defined at both {{.*}}{{[/\\]}}InputProblemsInconsistent{{[/\\]}}SubHeader.h:3:9 and {{.*}}{{[/\\]}}InputProblemsInconsistent/SubHeader.h:6:9
-# CHECK-NEXT: error: header '{{.*}}{{[/\\]}}InputProblemsInconsistent{{[/\\]}}SubHeader.h' has different contents dependening on how it was included
-# CHECK-NEXT: note: 'SYMBOL' in {{.*}}{{[/\\]}}InputProblemsInconsistent{{[/\\]}}SubHeader.h at 3:9 not always provided
-# CHECK-NEXT: note: 'SYMBOL' in {{.*}}{{[/\\]}}InputProblemsInconsistent{{[/\\]}}SubHeader.h at 6:9 not always provided
-# CHECK-NEXT: note: 'TypeInt' in {{.*}}{{[/\\]}}InputProblemsInconsistent{{[/\\]}}SubHeader.h at 10:13 not always provided

Added: clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.modularize
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.modularize?rev=178047&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.modularize (added)
+++ clang-tools-extra/trunk/test/modularize/ProblemsInconsistent.modularize Tue Mar 26 13:17:28 2013
@@ -0,0 +1,10 @@
+# RUN: modularize %s -x c++ 2>&1 | FileCheck %s
+
+Inputs/InconsistentHeader1.h
+Inputs/InconsistentHeader2.h
+
+# CHECK: error: 'SYMBOL' defined at both {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h:3:9 and {{.*}}{{[/\\]}}Inputs/InconsistentSubHeader.h:6:9
+# CHECK-NEXT: error: header '{{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h' has different contents dependening on how it was included
+# CHECK-NEXT: note: 'SYMBOL' in {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h at 3:9 not always provided
+# CHECK-NEXT: note: 'SYMBOL' in {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h at 6:9 not always provided
+# CHECK-NEXT: note: 'TypeInt' in {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h at 10:13 not always provided





More information about the cfe-commits mailing list