[clang] Fix missing include past a38b7a432d3cbb093af9310eba5b4982dc0a0243 (PR #85041)
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/85041 None >From aba8a875a3dcebb1300974297ab1276c6f657a93 Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Wed, 13 Mar 2024 08:54:15 +0100 Subject: [PATCH] Fix missing include past a38b7a432d3cbb093af9310eba5b4982dc0a0243 --- clang/include/clang/InstallAPI/FrontendRecords.h | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/include/clang/InstallAPI/FrontendRecords.h b/clang/include/clang/InstallAPI/FrontendRecords.h index 333015b6a11365..1f5bc37798befd 100644 --- a/clang/include/clang/InstallAPI/FrontendRecords.h +++ b/clang/include/clang/InstallAPI/FrontendRecords.h @@ -11,6 +11,7 @@ #include "clang/AST/Availability.h" #include "clang/AST/DeclObjC.h" +#include "clang/InstallAPI/HeaderFile.h" #include "clang/InstallAPI/MachO.h" namespace clang { ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix missing include past a38b7a432d3cbb093af9310eba5b4982dc0a0243 (PR #85041)
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/85041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [test] Avoid libc dep in Update warn-unsafe-buffer-usage-warning-data… (PR #79183)
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/79183 Avoid libc dep in warn-unsafe-buffer-usage-warning-data-invocation. To keep the test hermetic. This is in line with other existing declarations in the file that avoid includes. >From bd284ac0ea8d84b6c7913479063209e21d9180aa Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Tue, 23 Jan 2024 19:07:42 +0100 Subject: [PATCH] [test] Avoid libc dep in Update warn-unsafe-buffer-usage-warning-data-invocation To keep the test hermetic. This is in line with other existing declarations in the file that avoid includes. --- .../warn-unsafe-buffer-usage-warning-data-invocation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp b/clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp index 574afcd0eb6dce..5c9df12513e521 100644 --- a/clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp +++ b/clang/test/SemaCXX/warn-unsafe-buffer-usage-warning-data-invocation.cpp @@ -7,7 +7,6 @@ // RUN: %clang_cc1 -std=c++20 -fblocks -include %s %s 2>&1 | FileCheck --allow-empty %s // CHECK-NOT: [-Wunsafe-buffer-usage] -#include #ifndef INCLUDED #define INCLUDED #pragma clang system_header @@ -15,6 +14,8 @@ // no spanification warnings for system headers #else +typedef __INTPTR_TYPE__ intptr_t; + namespace std { class type_info; class bad_cast; ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix memory leak in HeaderSearchTest (PR #95927)
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/95927 AddressSanitizer: 56 byte(s) leaked in 1 allocation(s). (clang/unittests:lex_tests) >From f61a19058d3b7256702320fd4e94fb523615ccc9 Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Tue, 18 Jun 2024 15:52:50 +0200 Subject: [PATCH] Fix memory leak in HeaderSearchTest --- clang/unittests/Lex/HeaderSearchTest.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/unittests/Lex/HeaderSearchTest.cpp b/clang/unittests/Lex/HeaderSearchTest.cpp index 38ce3812c204f..b0375d5985f2e 100644 --- a/clang/unittests/Lex/HeaderSearchTest.cpp +++ b/clang/unittests/Lex/HeaderSearchTest.cpp @@ -19,6 +19,8 @@ #include "clang/Serialization/InMemoryModuleCache.h" #include "llvm/Support/MemoryBuffer.h" #include "gtest/gtest.h" +#include +#include namespace clang { namespace { @@ -350,8 +352,8 @@ TEST_F(HeaderSearchTest, HeaderFileInfoMerge) { std::string TextualPath = "/textual.h"; }; - auto ExternalSource = new MockExternalHeaderFileInfoSource(); - Search.SetExternalSource(ExternalSource); + auto ExternalSource = std::make_unique(); + Search.SetExternalSource(ExternalSource.get()); // Everything should start out external. auto ModularFE = AddHeader(ExternalSource->ModularPath); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [NFC]Fix memory leak in HeaderSearchTest (PR #95927)
https://github.com/dklimkin edited https://github.com/llvm/llvm-project/pull/95927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [NFC]Fix memory leak in HeaderSearchTest (PR #95927)
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/95927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Update ExternalPreprocessorSource.h (PR #96144)
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/96144 Add missing includes. >From bd4f6d50b57680f520ed22b5c5108ae6d9506ca3 Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Thu, 20 Jun 2024 09:18:18 +0200 Subject: [PATCH] Update ExternalPreprocessorSource.h Add missing includes. --- clang/include/clang/Lex/ExternalPreprocessorSource.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/include/clang/Lex/ExternalPreprocessorSource.h b/clang/include/clang/Lex/ExternalPreprocessorSource.h index 48429948dbffe..51c11c3adf6e7 100644 --- a/clang/include/clang/Lex/ExternalPreprocessorSource.h +++ b/clang/include/clang/Lex/ExternalPreprocessorSource.h @@ -13,6 +13,9 @@ #ifndef LLVM_CLANG_LEX_EXTERNALPREPROCESSORSOURCE_H #define LLVM_CLANG_LEX_EXTERNALPREPROCESSORSOURCE_H +#include +#include + namespace clang { class IdentifierInfo; ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Update ExternalPreprocessorSource.h (PR #96144)
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/96144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Avoid unusable variable in ByteCodeExprGen.cpp (PR #90469)
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/90469 Inline assert to avoid unusable variable warning/error when asserts are disabled. >From 4935be526d3f5f529924d5bef9cc36167a9e5c5c Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Mon, 29 Apr 2024 15:20:03 +0200 Subject: [PATCH] Avoid unusable variable in ByteCodeExprGen.cpp Inline assert to avoid unusable variable warning/error when asserts are disabled. --- clang/lib/AST/Interp/ByteCodeExprGen.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 626c30157b228f..568a929c6a1693 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -2363,8 +2363,7 @@ bool ByteCodeExprGen::VisitCXXUuidofExpr(const CXXUuidofExpr *E) { if (!this->emitGetPtrGlobal(*GlobalIndex, E)) return false; - const Record *R = this->getRecord(E->getType()); - assert(R); + assert(this->getRecord(E->getType())); const APValue &V = E->getGuidDecl()->getAsAPValue(); if (V.getKind() == APValue::None) ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Avoid unusable variable in ByteCodeExprGen.cpp (PR #90469)
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/90469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix output in coro-elide-thinlto.cpp (PR #90579)
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/90579 Current dir can be read-only. Use a temp path instead. >From 9140277a888ba6119730987bfb2cbbb4510b11c0 Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Tue, 30 Apr 2024 11:35:47 +0200 Subject: [PATCH] Fix output in coro-elide-thinlto.cpp Current dir can be read-only. Use a temp path instead. --- clang/test/CodeGenCoroutines/coro-elide-thinlto.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/CodeGenCoroutines/coro-elide-thinlto.cpp b/clang/test/CodeGenCoroutines/coro-elide-thinlto.cpp index 790899486ec9d1..5c5fed2f764622 100644 --- a/clang/test/CodeGenCoroutines/coro-elide-thinlto.cpp +++ b/clang/test/CodeGenCoroutines/coro-elide-thinlto.cpp @@ -4,8 +4,8 @@ // RUN: split-file %s %t // RUN: %clang --target=x86_64-linux -std=c++20 -O2 -flto=thin -I %S -c %t/coro-elide-callee.cpp -o %t/coro-elide-callee.o // RUN: %clang --target=x86_64-linux -std=c++20 -O2 -flto=thin -I %S -c %t/coro-elide-caller.cpp -o %t/coro-elide-caller.o -// RUN: llvm-lto -thinlto %t/coro-elide-callee.o %t/coro-elide-caller.o -o summary -// RUN: %clang_cc1 -O2 -x ir %t/coro-elide-caller.o -fthinlto-index=summary.thinlto.bc -emit-llvm -o - | FileCheck %s +// RUN: llvm-lto -thinlto %t/coro-elide-callee.o %t/coro-elide-caller.o -o %t/summary +// RUN: %clang_cc1 -O2 -x ir %t/coro-elide-caller.o -fthinlto-index=%t/summary.thinlto.bc -emit-llvm -o - | FileCheck %s //--- coro-elide-task.h #pragma once ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix output in coro-elide-thinlto.cpp (PR #90579)
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/90579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix clang-format-test.el past 625841c (PR #106398)
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/106398 None >From edeb17fdfb5ef6ce074fbdeec35d3e28b71592ca Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Wed, 28 Aug 2024 15:58:23 +0200 Subject: [PATCH] Fix clang-format-test.el past 625841c --- clang/tools/clang-format/clang-format-test.el | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clang/tools/clang-format/clang-format-test.el b/clang/tools/clang-format/clang-format-test.el index 41df1a9ca68af4..667d606b4f238d 100644 --- a/clang/tools/clang-format/clang-format-test.el +++ b/clang/tools/clang-format/clang-format-test.el @@ -58,16 +58,16 @@ (should-not delete) (should-not display) (should (equal args - '("-output-replacements-xml" "-assume-filename" "foo.cpp" -"-fallback-style" "none" + '("--output-replacements-xml" "--assume-filename" "foo.cpp" +"--fallback-style" "none" ;; Beginning of buffer, no byte-order mark. -"-offset" "0" +"--offset" "0" ;; We have two lines with 2×2 bytes for the umlauts, ;; 1 byte for the line ending, and 3 bytes for the ;; other ASCII characters each. -"-length" "16" +"--length" "16" ;; Length of a single line (without line ending). -"-cursor" "7"))) +"--cursor" "7"))) (ert-deftest clang-format-buffer--process-encoding () "Tests that text is sent to the clang-format process in the ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix clang-format-test.el past 625841c (PR #106398)
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/106398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix clang-format-test.el past 625841c (PR #106398)
dklimkin wrote: Race condition! Will update the other PR. https://github.com/llvm/llvm-project/pull/106398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang-format] Fix clang-format-buffer--buffer-encoding test (PR #106305)
dklimkin wrote: Hi darkfeline, Sorry I didn't see your PR and merged #106398 earlier. Please consider closing this one. https://github.com/llvm/llvm-project/pull/106305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [NFC]Fix memory leak in HeaderSearchTest (PR #95927)
dklimkin wrote: Hi AaronBallman, I think I opted to have a minimal change, it was on heap and I kept it this way. Seems not important for a test only code. As per NFC, thank you for the note. I considered it NFC as the prod code behavior didn't change. I'll keep in mind any behavior change counts. https://github.com/llvm/llvm-project/pull/95927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits