/llvm-project/clang/test/Frontend/ |
H A D | rewrite-includes-conditions.c | 1 // RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s 2 // RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s -o - | %clang_cc1 -Wall -Wextra -Wconversi… 50 // CHECK: #if 0 /* disabled by -frewrite-includes */ 53 // CHECK-NEXT: #endif /* disabled by -frewrite-includes */ 54 // CHECK-NEXT: #if 1 /* evaluated by -frewrite-includes */ 55 // CHECK-NEXT: # 6 "{{.*}}rewrite-includes-conditions.c" 57 // CHECK: #if 0 /* disabled by -frewrite-includes */ 60 // CHECK-NEXT: #endif /* disabled by -frewrite-includes */ 61 // CHECK-NEXT: #if 0 /* evaluated by -frewrite-includes */ 62 // CHECK-NEXT: # 14 "{{.*}}rewrite-includes-conditions.c" [all …]
|
H A D | rewrite-includes.c | 1 // RUN: %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | F… 2 // RUN: %clang_cc1 -E -frewrite-includes -P -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - … 3 // RUN: %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | %… 27 // CHECK: {{^}}# 1 "{{.*}}rewrite-includes.c"{{$}} 31 …f defined(__CLANG_REWRITTEN_INCLUDES) /* rewrite-includes1.h expanded by -frewrite-includes */{{$}} 33 // CHECK-NEXT: {{^}}#else /* rewrite-includes1.h expanded by -frewrite-includes */{{$}} 34 // CHECK-NEXT: {{^}}# 7 "{{.*}}rewrite-includes.c"{{$}} 36 // CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}} 38 // CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}} 41 …ed(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* rewrite-includes2.h expanded by -frewrite-includes */{{$}} [all …]
|
H A D | rewrite-includes-modules.c | 5 …les -fimplicit-module-maps -fmodules-cache-path=%t %s -I%t -E -frewrite-includes -o - | FileCheck … 6 …module-maps -fmodules-cache-path=%t -x objective-c %s -I%t -E -frewrite-includes -o - | FileCheck … 7 …mplicit-module-maps -fmodules-cache-path=%t -x c++ %s -I%t -E -frewrite-includes -o - | FileCheck … 15 // CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}} 17 // CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}} 18 // CHECK-NEXT: # 10 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}} 19 // CHECK-NEXT: #pragma clang module import dummy /* clang -frewrite-includes: implicit import */{{$… 20 // CHECK-NEXT: # 11 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}} 22 // CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}} 24 // CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}} [all …]
|
H A D | rewrite-includes-line-markers.c | 1 // RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s | FileCheck %s --check-prefix=GNU 2 // RUN: %clang_cc1 -E -frewrite-includes -fuse-line-directives -I %S/Inputs %s | FileCheck %s --che… 8 // GNU: {{^}}# 1 "{{.*}}rewrite-includes-line-markers.c" 14 // GNU: {{^}}# 4 "{{.*}}rewrite-includes-line-markers.c" 2 18 // GNU: {{^}}# 7 "{{.*}}rewrite-includes-line-markers.c" 2 20 // LINE: {{^}}#line 1 "{{.*}}rewrite-includes-line-markers.c" 26 // LINE: {{^}}#line 4 "{{.*}}rewrite-includes-line-markers.c" 30 // LINE: {{^}}#line 7 "{{.*}}rewrite-includes-line-markers.c"
|
/llvm-project/clang/test/Modules/ |
H A D | require-modular-includes.m | 6 // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ 12 // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ 13 // RUN: -I %S/Inputs/require-modular-includes \ 19 // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ 25 // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ 26 // RUN: -I %S/Inputs/require-modular-includes \ 32 // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ 33 // RUN: -I %S/Inputs/require-modular-includes \ 39 // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \ 45 // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ [all …]
|
H A D | framework-public-includes-private.m | 4 // RUN: %hmaptool write %S/Inputs/framework-public-includes-private/a.hmap.json %t/a.hmap 5 // RUN: %hmaptool write %S/Inputs/framework-public-includes-private/z.hmap.json %t/z.hmap 7 // RUN: sed -e "s@TEST_DIR@%{/S:regex_replacement}/Inputs/framework-public-includes-private@g" \ 8 // RUN: %S/Inputs/framework-public-includes-private/z.yaml > %t/z.yaml 13 // RUN: -F%S/Inputs/framework-public-includes-private \ 18 // RUN: -F%S/Inputs/framework-public-includes-private \ 25 // CHECK: public framework header includes private framework header 'A/APriv.h' 26 // CHECK: public framework header includes private framework header 'A/APriv2.h' 27 // CHECK: public framework header includes private framework header 'Z/ZPriv.h' 33 …ected-warning@Inputs/framework-public-includes-private/A.framework/Headers/A.h:1{{public framework… [all …]
|
/llvm-project/clang-tools-extra/clangd/unittests/ |
H A D | HeadersTests.cpp | 73 IncludeStructure &Includes) { in getID() argument 77 return Includes.getOrCreateID(*Entry); in getID() 85 IncludeStructure Includes; in collectIncludes() local 86 Includes.collect(*Clang); in collectIncludes() 89 return Includes; in collectIncludes() 169 auto Includes = collectIncludes(); in TEST_F() 170 EXPECT_THAT(Includes.MainFileIncludes, in TEST_F() 173 EXPECT_THAT(Includes.includeDepth(getID(MainFile, Includes)), 174 UnorderedElementsAre(Distance(getID(MainFile, Includes), 165 auto Includes = collectIncludes(); TEST_F() local 184 auto Includes = collectIncludes(); TEST_F() local 216 auto Includes = collectIncludes(); TEST_F() local 269 auto Includes = collectIncludes(); TEST_F() local [all...] |
H A D | IncludeCleanerTests.cpp | 141 // Currently the default behavior is to ignore unused angled includes in TEST() 308 FixMessage("add all missing includes")})), in TEST() 313 FixMessage("add all missing includes")})), in TEST() 318 FixMessage("add all missing includes")})), in TEST() 324 FixMessage("add all missing includes")})), in TEST() 331 FixMessage("add all missing includes"), in TEST() 337 FixMessage("add all missing includes")})), in TEST() 342 FixMessage("add all missing includes")})), in TEST() 347 FixMessage("add all missing includes")})), in TEST() 352 FixMessage("add all missing includes")})))); in TEST() 527 auto Includes = convertIncludes(AST); TEST() local [all...] |
/llvm-project/utils/bazel/llvm-project-overlay/mlir/ |
H A D | tblgen.bzl | 50 def _get_transitive_includes(includes, deps): 51 """Obtain the includes paths for a target and its transitive dependencies. 54 includes: a list of include paths 60 direct = includes, 64 def _prefix_roots(ctx, includes): 65 """Map the given includes to be relative to all root directories. 72 for include in includes: 78 def _resolve_includes(ctx, includes): 88 for include in includes: 100 _resolve_includes(ctx, ctx.attr.includes), [all …]
|
H A D | BUILD.bazel | 149 includes = ["include"], 163 includes = ["include"], 320 includes = ["include"], 356 includes = ["include"], 386 includes = ["include"], 421 includes = ["include"], 483 includes = ["include"], 502 includes = ["include"], 517 includes = ["include"], 530 includes [all...] |
/llvm-project/libcxx/test/libcxx/ |
H A D | transitive_includes.gen.py | 9 # Test that we don't remove transitive includes of public C++ headers in the library accidentally. 15 # This is not meant to block libc++ from removing unused transitive includes 38 //--- generate-transitive-includes.sh.cpp 51 // RUN: echo "#include <{header}>" | %{{cxx}} -xc++ - %{{flags}} %{{compile_flags}} --trace-includes -fshow-skipped-includes --preprocess > /dev/null 2> %t/trace-includes.{normalized_header}.txt 54 all_traces.append(f"%t/trace-includes.{normalized_header}.txt") 78 // When built with modules, this test doesn't work because --trace-includes doesn't 79 // report the stack of includes correctly. 82 // This test uses --trace-includes, whic [all...] |
H A D | transitive_includes_to_csv.py |
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/portability/ |
H A D | restrict-system-includes-transitive.cpp | 3 // RUN: cp -r %S/Inputs/restrict-system-includes %T/Headers/portability-restrict-system-includes 4 // RUN: %check_clang_tidy -std=c++11 %s portability-restrict-system-includes %t \ 5 // RUN: -- -config="{CheckOptions: {portability-restrict-system-includes.Includes: 'transitive.h,… 7 …- -I %T/Headers/portability-restrict-system-includes -isystem %T/Headers/portability-restrict-syst… 8 // RUN: FileCheck -input-file=%T/Headers/portability-restrict-system-includes/transitive2.h %s -che… 12 // transitive.h includes <r.h> and <t.h> 17 // transitive.h includes <s.h> and <t.h>
|
/llvm-project/clang/test/Driver/ |
H A D | freebsd-include-paths.c | 5 // RUN: | FileCheck %s --check-prefix=DRIVER-PASS-INCLUDES 6 // DRIVER-PASS-INCLUDES: "-cc1" {{.*}}"-resource-dir" "[[RESOURCE:[^"]+]]" 7 // DRIVER-PASS-INCLUDES-SAME: "-internal-isystem" "[[RESOURCE]]/include" 8 // DRIVER-PASS-INCLUDES-SAME: {{^}} "-internal-externc-isystem" "/usr/include" 12 // RUN: | FileCheck %s --check-prefix=DRIVER-PASS-INCLUDES-CXX 13 // DRIVER-PASS-INCLUDES-CXX: "-cc1" {{.*}}"-resource-dir" "[[RESOURCE:[^"]+]]" 14 // DRIVER-PASS-INCLUDES-CXX-SAME: "-internal-isystem" "/usr/include/c++/v1" 15 // DRIVER-PASS-INCLUDES-CXX-SAME: {{^}} "-internal-isystem" "[[RESOURCE]]/include" 16 // DRIVER-PASS-INCLUDES-CXX-SAME: {{^}} "-internal-externc-isystem" "/usr/include"
|
/llvm-project/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/ |
H A D | includes.pass.cpp | 15 // includes(Iter1 first1, Iter1 last1, Iter2 first2, Iter2 last2); 36 assert(std::includes(Iter1(ia), Iter1(ia), Iter2(ib), Iter2(ib))); in test() 37 assert(!std::includes(Iter1(ia), Iter1(ia), Iter2(ib), Iter2(ib+1))); in test() 38 assert(std::includes(Iter1(ia), Iter1(ia+1), Iter2(ib), Iter2(ib))); in test() 39 assert(std::includes(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa))); in test() 41 assert(std::includes(Iter1(ia), Iter1(ia+sa), Iter2(ib), Iter2(ib+sb))); in test() 42 assert(!std::includes(Iter1(ib), Iter1(ib+sb), Iter2(ia), Iter2(ia+sa))); in test() 44 assert(std::includes(Iter1(ia), Iter1(ia+2), Iter2(ic), Iter2(ic+2))); in test() 45 assert(!std::includes(Iter1(ia), Iter1(ia+2), Iter2(ib), Iter2(ib+2))); in test() 47 assert(std::includes(Iter1(ia), Iter1(ia+sa), Iter2(id), Iter2(id+1))); in test() [all …]
|
H A D | includes_comp.pass.cpp | 15 // includes(Iter1 first1, Iter1 last1, Iter2 first2, Iter2 last2, Compare comp); 37 assert(std::includes(Iter1(ia), Iter1(ia), Iter2(ib), Iter2(ib), std::greater<int>())); in test() 38 assert(!std::includes(Iter1(ia), Iter1(ia), Iter2(ib), Iter2(ib+1), std::greater<int>())); in test() 39 assert(std::includes(Iter1(ia), Iter1(ia+1), Iter2(ib), Iter2(ib), std::greater<int>())); in test() 40 assert(std::includes(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), std::greater<int>())); in test() 42 assert(std::includes(Iter1(ia), Iter1(ia+sa), Iter2(ib), Iter2(ib+sb), std::greater<int>())); in test() 43 assert(!std::includes(Iter1(ib), Iter1(ib+sb), Iter2(ia), Iter2(ia+sa), std::greater<int>())); in test() 45 assert(std::includes(Iter1(ia+8), Iter1(ia+sa), Iter2(ic), Iter2(ic+sc), std::greater<int>())); in test() 46 assert(!std::includes(Iter1(ia+8), Iter1(ia+sa), Iter2(ib), Iter2(ib+sb), std::greater<int>())); in test() 48 assert(std::includes(Iter1(ia), Iter1(ia+sa), Iter2(id), Iter2(id+1), std::greater<int>())); in test() [all …]
|
/llvm-project/libcxx/docs/DesignDocs/ |
H A D | HeaderRemovalPolicy.rst | 12 Standard indirectly adds additional header includes, using the smaller headers 23 A disadvantage is that users unknowingly depend on these transitive includes. 26 algorithms will still work through those transitive includes. This problem is 29 To ease the removal of transitive includes in libc++, libc++ will remove 30 unnecessary transitive includes in newly supported C++ versions. This means 31 that users will have to fix their missing includes in order to upgrade to a 33 transitive includes at any other time, however new language versions will be 34 used as a convenient way to perform bulk removals of transitive includes. 61 discover and fix the missing includes, lessening the burden for the vendors.
|
/llvm-project/clang/test/Index/ |
H A D | file-includes.c | 10 // RUN: c-index-test -file-includes-in=%s %s | FileCheck %s -check-prefix=LOCAL 11 // RUN: env CINDEXTEST_EDITING=1 c-index-test -file-includes-in=%s %s | FileCheck %s -check-prefix=… 12 // RUN: c-index-test -file-includes-in=%s %s -include %t.h | FileCheck %s -check-prefix=LOCAL 13 // RUN: env CINDEXTEST_EDITING=1 c-index-test -file-includes-in=%s %s -include %t.h | FileCheck %s … 18 // RUN: c-index-test -file-includes-in=%S/targeted-top.h %s | FileCheck %s -check-prefix=TOP 19 // RUN: env CINDEXTEST_EDITING=1 c-index-test -file-includes-in=%S/targeted-top.h %s | FileCheck %s… 20 // RUN: c-index-test -file-includes-in=%S/targeted-top.h %s -include %t.h | FileCheck %s -check-pre… 21 // RUN: env CINDEXTEST_EDITING=1 c-index-test -file-includes-in=%S/targeted-top.h %s -include %t.h … 26 // RUN: c-index-test -file-includes-in=%S/Inputs/empty.h %S/Inputs/empty.h
|
H A D | get-cursor-includes.c | 1 #include "get-cursor-includes-2.h" 2 #include "get-cursor-includes-2.h" 4 …e-pch %t.h.pch -I%S/Inputs -Xclang -detailed-preprocessing-record %S/Inputs/get-cursor-includes-2.h 5 // RUN: c-index-test -cursor-at=%S/Inputs/get-cursor-includes-2.h:1:5 -I%S/Inputs -include %t.h %s … 7 // CHECK: inclusion directive=get-cursor-includes-1.h
|
/llvm-project/clang/include/clang/Tooling/Inclusions/ |
H A D | HeaderIncludes.h | 1 //===--- HeaderIncludes.h - Insert/Delete #includes for C++ code--*- C++-*-===// 71 /// #includes in the block; if the existing #includes are not already sorted, 80 /// Removes all existing #includes and #imports of \p Header quoted with <> if 82 /// This doesn't resolve the header file path; it only deletes #includes and 108 // Map from include name (quotation trimmed) to a list of existing includes 110 // and "x" will be treated as the same header when deleting #includes. 114 /// Map from priorities of #include categories to all #includes in the same 115 /// category. This is used to find #includes of the same category when 116 /// inserting new #includes. #includes in the same categories are sorted in 128 // inserting new #includes into the actual code section (e.g. after a
|
/llvm-project/utils/bazel/llvm-project-overlay/mlir/test/ |
H A D | BUILD.bazel | 77 includes = ["."], 90 includes = ["lib/Dialect/Test"], 357 includes = ["lib/Dialect/Transform"], 393 includes = [ 494 includes = ["lib/Interfaces/TilingInterface"], 517 includes = ["lib/Interfaces/TilingInterface"], 609 includes = ["lib/Dialect/Test"], 638 includes = ["lib/Dialect/Test"], 653 includes = ["lib/Dialect/Test"], 732 includes [all...] |
/llvm-project/clang/test/Preprocessor/ |
H A D | minimize-whitespace-messages.c | 2 // RUN: not %clang -c -fkeep-system-includes %s 2>&1 | FileCheck %s --check-prefix=ON -DOPT=-fkeep-… 6 …UN: not %clang -c -fno-keep-system-includes %s 2>&1 | FileCheck %s --check-prefix=OFF -DOPT=-fno-… 10 …t %clang -E -fkeep-system-includes -x assembler-with-cpp %s 2>&1 | FileCheck %s --check-prefix=ASM…
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/llvmlibc/ |
H A D | restrict-system-libc-headers.rst | 6 Finds includes of system libc headers not provided by the compiler within 25 .. option:: Includes 30 respectively. The default is `-*`, which disallows all includes. 32 This can be used to allow known safe includes such as Linux development 33 headers. See :doc:`portability-restrict-system-includes 34 <../portability/restrict-system-includes>` for more
|
/llvm-project/clang-tools-extra/include-cleaner/lib/ |
H A D | HTMLReport.cpp | 140 const include_cleaner::Includes &Includes; 153 SmallVector<const Include *> Includes = {}; 155 std::string Insert = {}; // If we had no includes, what would we insert? 179 R.Includes.append(Includes.match(H)); in spellHeader() 185 if (!R.Includes.empty()) 188 llvm::sort(R.Includes); in fillTarget() 189 R.Includes.erase(std::unique(R.Includes in fillTarget() 138 const include_cleaner::Includes &Includes; global() member in clang::include_cleaner::__anonf7a010870111::Reporter 151 SmallVector<const Include *> Includes = {}; global() member 212 Reporter(llvm::raw_ostream & OS,ASTContext & Ctx,const HeaderSearch & HS,const include_cleaner::Includes & Includes,const PragmaIncludes * PI,FileID MainFile) Reporter() argument 513 writeHTMLReport(FileID File,const include_cleaner::Includes & Includes,llvm::ArrayRef<Decl * > Roots,llvm::ArrayRef<SymbolReference> MacroRefs,ASTContext & Ctx,const HeaderSearch & HS,PragmaIncludes * PI,llvm::raw_ostream & OS) writeHTMLReport() argument [all...] |
/llvm-project/clang-tools-extra/clangd/ |
H A D | ParsedAST.cpp | 137 // However this confuses clang-tidy checks: they don't see any #includes! 138 // So we replay the *non-transitive* #includes that appear in the main-file. 146 static void attach(std::vector<Inclusion> Includes, CompilerInstance &Clang, in attach() argument 154 std::move(Includes), ExistingCallbacks, Clang.getSourceManager(), PP, in attach() 163 ReplayPreamble(std::vector<Inclusion> Includes, PPCallbacks *Delegate, in ReplayPreamble() argument 166 : Includes(std::move(Includes)), Delegate(Delegate), SM(SM), PP(PP) { in ReplayPreamble() 197 for (const auto &Inc : Includes) { in replay() 231 // case of angled includes this will contain tok::less instead of in replay() 253 const std::vector<Inclusion> Includes; member in clang::clangd::__anon68555b350111::ReplayPreamble 657 IncludeStructure Includes; build() local 838 ParsedAST(PathRef TUPath,llvm::StringRef Version,std::shared_ptr<const PreambleData> Preamble,std::unique_ptr<CompilerInstance> Clang,std::unique_ptr<FrontendAction> Action,syntax::TokenBuffer Tokens,MainFileMacros Macros,std::vector<PragmaMark> Marks,std::vector<Decl * > LocalTopLevelDecls,std::vector<Diag> Diags,IncludeStructure Includes,include_cleaner::PragmaIncludes PI) ParsedAST() argument [all...] |