[PATCH] D133574: [C2x] reject type definitions in offsetof

2023-01-26 Thread Alexey Neyman via Phabricator via cfe-commits
stilor added a comment. In D133574#4083742 , @aaron.ballman wrote: > In D133574#4083724 , @asbirlea > wrote: > >> Following this change, the following emits warnings: >> https://godbolt.org/z/cvGdMWqEa, https:/

[PATCH] D142637: A slightly more concise AST dump :)

2023-01-26 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/test/AST/ast-dump-attr-type.cpp:12 +// CHECK-NEXT:`-BuiltinType 0x{{[^ ]*}} 'int' +// CHECK-NOT: `-PointerType 0x564c31a07520 'int *' sammccall wrote: > Can you add a second example where the attri

[PATCH] D142421: [Sanitizers] fix -fno-sanitize-link-runtime for darwin

2023-01-26 Thread Julian Lettner via Phabricator via cfe-commits
yln added a comment. Looks harmless enough, even though I am not sure why we have a completely separate code path on Darwin. The other toolchain driver seem to have shared code for this in `clang/lib/Driver/ToolChains/CommonArgs.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D142421: [Sanitizers] fix -fno-sanitize-link-runtime for darwin

2023-01-26 Thread Brittany Blue Gaston via Phabricator via cfe-commits
thetruestblue accepted this revision. thetruestblue added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142421/new/ https://reviews.llvm.org/D142421 ___ cfe-commits mailing list cfe-commi

[PATCH] D142421: [Sanitizers] fix -fno-sanitize-link-runtime for darwin

2023-01-26 Thread Roy Sundahl via Phabricator via cfe-commits
rsundahl accepted this revision. rsundahl added a comment. LGTM as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142421/new/ https://reviews.llvm.org/D142421 ___ cfe-commits mailing list cfe-commit

Re: [clang] 9dc4af3 - Re-land "[clang] Add early exit when checking for const init of arrays."

2023-01-26 Thread Richard Smith via cfe-commits
This change doesn't look correct to me. It's possible to observe an array during its own initialization, and if that happens, the array needs to be filled with the array filler up to its declared length. It's not beautiful, but here's a testcase that was broken by this change: https://godbolt.org/z

[PATCH] D142604: [Clang] Fix __VA_OPT__ implementation so that it treats the concatenation of a non-placemaker token and placemaker token as a non-placemaker token

2023-01-26 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 492589. shafik added a comment. - Apply clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142604/new/ https://reviews.llvm.org/D142604 Files: clang/lib/Lex/TokenLexer.cpp clang/test/Preprocessor/macro_vaopt_p1042r1.cpp Index: clang/te

[PATCH] D142637: A slightly more concise AST dump :)

2023-01-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/test/AST/ast-dump-attr-type.cpp:12 +// CHECK-NEXT:`-BuiltinType 0x{{[^ ]*}} 'int' +// CHECK-NOT: `-PointerType 0x564c31a07520 'int *' gribozavr2 wrote: > sammccall wrote: > > Can you add a second ex

[PATCH] D142675: [clang][CGDebugInfo] emit DW_LANG_C_plus_plus_{20|17} DW_LANG_C17

2023-01-26 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: dblaikie, jcranmer-intel. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Looks like these DW_AT_language tags made it into

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D142014#4081922 , @v1nh1shungry wrote: > I just came up with a case where the original implementation and this patch > behave differently. > > void foobar(const float &); > int main() { > foobar(0); >^ >

[PATCH] D142675: [clang][CGDebugInfo] emit DW_LANG_C_plus_plus_{20|17} DW_LANG_C17

2023-01-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. This was discussed in D138597 & we decided not to implement these due to the risk of breaking existing v5 clients that might not know about the post-v5-release codes. Implementing the v6 codes as an extension might be an option, or em

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra updated this revision to Diff 492596. sivachandra added a comment. Use the HeaderFileExtensions pattern to match constructs in header files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142592/new/ https://reviews.llvm.org/D142592 Fil

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra updated this revision to Diff 492597. sivachandra added a comment. Update release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142592/new/ https://reviews.llvm.org/D142592 Files: clang-tools-extra/clang-tidy/llvmlibc/CMakeLis

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:104 +Checks that all implicit and explicit inline functions in header files are +tagged with the ``LIBC_INLINE`` macro. See the `libc style guide +`_ f

[PATCH] D142592: [clang-tidy][libc] Add an inline function checker for the libc project.

2023-01-26 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp:20 +void InlineFunctionDeclCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher(decl(functionDecl()).bind("func_decl"), this); +} Cloc

[PATCH] D142578: [Clang][Doc] Edit the Clang release notes

2023-01-26 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel added a comment. I think it's worthwhile to mark comments with the "Done" checkmark in Phrabricator if they have been addressed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142578/new/ https://reviews.llvm.org/D142578

[PATCH] D142139: [clang-format] Disallow templates to be followed by literal

2023-01-26 Thread Emilia Dreamer via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8a3de13573bd: [clang-format] Disallow templates to be followed by literal (authored by rymiel). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 8a3de13 - [clang-format] Disallow templates to be followed by literal

2023-01-26 Thread Emilia Dreamer via cfe-commits
Author: Emilia Dreamer Date: 2023-01-27T04:01:11+02:00 New Revision: 8a3de13573bdeaee13ec959fa2af0d11f21f5f00 URL: https://github.com/llvm/llvm-project/commit/8a3de13573bdeaee13ec959fa2af0d11f21f5f00 DIFF: https://github.com/llvm/llvm-project/commit/8a3de13573bdeaee13ec959fa2af0d11f21f5f00.diff

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2023-01-26 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. I've made a very simple reproducer for this crash, clang-tidy executes on an x86 machine. Requires aarch64 and/or arm support compiled in. crashes - clang-tidy crash.cpp -checks="cert-dcl58-cpp" -- -target arm crashes - clang-tidy crash.cpp -checks="cert-dcl58-cpp" --

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2023-01-26 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D136886#4083762 , @vabridgers wrote: > It appears to me this change https://reviews.llvm.org/D116774 is responsible > for the unexpected behavior. Question for @jrtc27 : do you think if we could > make this change consistent

[clang] 798494e - [clang][TypePrinter] Support expression template arguments when checking defaultedness

2023-01-26 Thread Michael Buch via cfe-commits
Author: Michael Buch Date: 2023-01-27T02:24:32Z New Revision: 798494ed4f112bf64dcabbe8b60becb42b23208f URL: https://github.com/llvm/llvm-project/commit/798494ed4f112bf64dcabbe8b60becb42b23208f DIFF: https://github.com/llvm/llvm-project/commit/798494ed4f112bf64dcabbe8b60becb42b23208f.diff LOG:

[clang] 8b4279b - [clang][TemplateBase] Add IsDefaulted bit to TemplateArgument

2023-01-26 Thread Michael Buch via cfe-commits
Author: Michael Buch Date: 2023-01-27T02:24:33Z New Revision: 8b4279b66fc2f535184642b739b573ead1733711 URL: https://github.com/llvm/llvm-project/commit/8b4279b66fc2f535184642b739b573ead1733711 DIFF: https://github.com/llvm/llvm-project/commit/8b4279b66fc2f535184642b739b573ead1733711.diff LOG:

[clang] 3d7dcec - [clang][TypePrinter] Test TemplateArgument::IsDefaulted when omitting default arguments

2023-01-26 Thread Michael Buch via cfe-commits
Author: Michael Buch Date: 2023-01-27T02:24:33Z New Revision: 3d7dcec5db2f86bd8b9142d180716725a8fc0b0f URL: https://github.com/llvm/llvm-project/commit/3d7dcec5db2f86bd8b9142d180716725a8fc0b0f DIFF: https://github.com/llvm/llvm-project/commit/3d7dcec5db2f86bd8b9142d180716725a8fc0b0f.diff LOG:

[PATCH] D142632: [clang][TypePrinter] Support expression template arguments when checking defaultedness

2023-01-26 Thread Michael Buch via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG798494ed4f11: [clang][TypePrinter] Support expression template arguments when checking… (authored by Michael137). Repository: rG LLVM Github Monor

[clang] 29ecf0e - [clang][DebugInfo] Check TemplateArgument::IsDefaulted

2023-01-26 Thread Michael Buch via cfe-commits
Author: Michael Buch Date: 2023-01-27T02:24:34Z New Revision: 29ecf0e62cd7899dee84732a31875179ec4d5a80 URL: https://github.com/llvm/llvm-project/commit/29ecf0e62cd7899dee84732a31875179ec4d5a80 DIFF: https://github.com/llvm/llvm-project/commit/29ecf0e62cd7899dee84732a31875179ec4d5a80.diff LOG:

[PATCH] D141826: [clang][TemplateBase] Add IsDefaulted bit to TemplateArgument

2023-01-26 Thread Michael Buch via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8b4279b66fc2: [clang][TemplateBase] Add IsDefaulted bit to TemplateArgument (authored by Michael137). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D142333: [clang][DebugInfo] Check TemplateArgument::IsDefaulted

2023-01-26 Thread Michael Buch via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG29ecf0e62cd7: [clang][DebugInfo] Check TemplateArgument::IsDefaulted (authored by Michael137). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D141827: [clang][TypePrinter] Test TemplateArgument::IsDefaulted when omitting default arguments

2023-01-26 Thread Michael Buch via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3d7dcec5db2f: [clang][TypePrinter] Test TemplateArgument::IsDefaulted when omitting default… (authored by Michael137). Repository: rG LLVM Github

[PATCH] D142560: Allow getRawCommentForDecl to find comments in macros

2023-01-26 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan added a comment. Thank you for looking into the failure. Fortunately the test is passing on the AIX bot now and locally for me - it looks like a clean build fixed it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142560/new/ https://revi

[PATCH] D142014: [clangd] fix wrong CalleeArgInfo in the hover

2023-01-26 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. In D142014#4084263 , @nridge wrote: > In D142014#4081922 , @v1nh1shungry > wrote: > >> I just came up with a case where the original implementation and this patch >> behave differen

[PATCH] D142673: [clang-tidy] Refactor HeaderGuardCheck to add HeaderGuardStyle

2023-01-26 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 492633. KyleFromKitware changed the edit policy from "All Users" to "Only User: KyleFromKitware (Kyle Edwards)". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142673/new/ https://reviews.llvm.org/D142673 Files: clang-tools-extra/clang-tidy

[PATCH] D142123: [clang-tidy] Add header guard style to suggest use of #pragma once

2023-01-26 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 492634. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142123/new/ https://reviews.llvm.org/D142123 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-tools-extra/clang-tidy/readability/PragmaOnceHeaderGuardStyle.cpp cl

[PATCH] D142604: [Clang] Fix __VA_OPT__ implementation so that it treats the concatenation of a non-placemaker token and placemaker token as a non-placemaker token

2023-01-26 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. It looks like the modules test failures are unrelated and are failing all the recent modules builds. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142604/new/ https://reviews.llvm.org/D142604 ___ cfe-commits mailing l

[PATCH] D139454: [CMake] Replace clang binary if using clang-bolt target

2023-01-26 Thread Amir Ayupov via Phabricator via cfe-commits
Amir updated this revision to Diff 492638. Amir added a comment. Use generator expression, put clang-bolt temp binary to CMAKE_CURRENT_BINARY_DIR Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139454/new/ https://reviews.llvm.org/D139454 Files: c

[PATCH] D141192: [Clang] Fix warnings on bad shifts.

2023-01-26 Thread Dmitriy Chestnykh via Phabricator via cfe-commits
chestnykh added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141192/new/ https://reviews.llvm.org/D141192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-01-26 Thread WÁNG Xuěruì via Phabricator via cfe-commits
xen0n created this revision. xen0n added reviewers: SixWeining, wangleiat, MaskRay, xry111. Herald added a project: All. xen0n requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This follows v1.00 of the LoongArch Toolchain Conventions

[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Herald added a project: All. Mordante requested review of this revision. Herald added projects: clang, libc++. Herald added subscribers: libcxx-commits, cfe-commits. Herald added a reviewer: libc++. This attempts to fix the issue introduced in 12cb1cb3720d

[clang] 760136f - [clang][Interp] Implement __builtin_assume

2023-01-26 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-01-27T07:54:37+01:00 New Revision: 760136ff13ba172787c3367664fe9f3f7b3b64ef URL: https://github.com/llvm/llvm-project/commit/760136ff13ba172787c3367664fe9f3f7b3b64ef DIFF: https://github.com/llvm/llvm-project/commit/760136ff13ba172787c3367664fe9f3f7b3b64ef.diff LO

[PATCH] D141193: [clang][Interp] Implement __builtin_assume

2023-01-26 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG760136ff13ba: [clang][Interp] Implement __builtin_assume (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: libcxx/include/module.modulemap.in:1421 + private header "__type_traits/integral_constant.h" + export type_traits.common_reference +} Note this looks wrong from libc++'s perspective. When this "solves" the

[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 492648. Mordante added a comment. Herald added a subscriber: arichardson. Fix CI run instead of libc++. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142690/new/ https://reviews.llvm.org/D142690 Files: clan

[PATCH] D142692: [clang] Store the template param list of an explicit variable template specialization

2023-01-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added reviewers: rsmith, mizvekov. Herald added subscribers: kadircet, arphaman. Herald added a project: All. nridge requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. VarTemplateSpecializ

[PATCH] D142692: [clang] Store the template param list of an explicit variable template specialization

2023-01-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. So far the only test I added is in clangd semantic highlighting because that's how I noticed the `template<>` missing from the AST, but I'm open to suggestions on where to add a test at the clang layer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2023-01-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In my previous comments I indicated how to fix the problem in the lang-tidy check, and I could reproduce the crash in `ImportCorrectTemplatedDecl` and have the fix for it. I can reproduce the assertion "Declaration not emitted!" but did not found the fix, the AST conta

[PATCH] D139926: [clangd] Add semantic token for angle brackets

2023-01-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D139926#4076652 , @ckandeler wrote: > Thanks for the test cases! > All fixed, except: > >> // variable template specialization >> // parameter and argument lists are missing semantic tokens >> template <> >> constexpr int V = 5;

[PATCH] D142655: [WIP][clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions options

2023-01-26 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:149 + Options.HeaderFileExtensions = {"", "h", "hh", "hpp", "hxx"}; + Options.ImplementationFileExtensions = {"c", "cc", "cpp", "cxx"}; Options.HeaderFilterRegex = "";

[clang] 7b966e2 - [clang][Interp][NFC] Add GetPtrBasePop opcode

2023-01-26 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-01-27T08:05:53+01:00 New Revision: 7b966e2156b8b461a29a49122286f804a30236e9 URL: https://github.com/llvm/llvm-project/commit/7b966e2156b8b461a29a49122286f804a30236e9 DIFF: https://github.com/llvm/llvm-project/commit/7b966e2156b8b461a29a49122286f804a30236e9.diff LO

[PATCH] D136886: [clang] ASTImporter: Fix importing of va_list types and declarations

2023-01-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The "Declaration not emitted" crash is reproducible by change of file "test/Index/targeted-cursor.c", the similar lines should be replaced to this (only the `target aarch64` is added): // RUN: env CINDEXTEST_FAILONERROR=1 CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_N

<    1   2   3