[PATCH] D132640: [clang-tidy] Fix modernize-use-emplace to support alias cases

2022-08-25 Thread Dong-hee Na via Phabricator via cfe-commits
corona10 updated this revision to Diff 455807. corona10 added a comment. - Update modernize-use-emplace to support emplacy cases for alias types. - Add new test - Update release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132640/new/ https:

[PATCH] D132719: [clang-format] Rework removeBraces() in Format.cpp

2022-08-25 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/Format.cpp:1914 - assert(Token->isOneOf(tok::l_brace, tok::r_brace)); - assert(Token->Previous || Token == Line->First); - const FormatToken *Next = Token->Next; Deleted by mis

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 455804. carlosgalvezp added a comment. Rename option to IgnoreMacros and update logic and tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files: clang-

[PATCH] D132294: [clang-tidy] Add check of sprintf with fixed size buffer

2022-08-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Should this check be renamed to bugprone-sprintf-with-fixed-size-buffer? Have you thought about an option to flag all calls to sprintf as they are typically not recommended by a lot of coding practice guides. Obviously we couldn't generate a fix-it as the buffer size ma

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3748769 , @ruoso wrote: > I just noticed that the document was implying that Header Units were separate > from the Standard C++ Modules, but they are an integral part of the language > in the specification of module

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 455802. ChuanqiXu marked 5 inline comments as done. ChuanqiXu added a comment. Address comments: - Change the file name to `StandardCPlusPlusModules` - Combine header units with modules more tightly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D132719: [clang-format] Rework removeBraces() in Format.cpp

2022-08-25 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: HazardyKnusperkeks, MyDeveloperDay, curdeius. Herald added a project: All. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/573

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D132461#3748818 , @carlosgalvezp wrote: > In D132461#3748812 , @njames93 > wrote: > >> The AllowWhileFlase option seems the wrong way to go about silencing do >> while(false) m

[clang] 17631ac - [Coroutines] Store the index for final suspend point if there is unwind coro end

2022-08-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-26T14:05:46+08:00 New Revision: 17631ac676bc44b7fd5c79abc66844efb4e1b533 URL: https://github.com/llvm/llvm-project/commit/17631ac676bc44b7fd5c79abc66844efb4e1b533 DIFF: https://github.com/llvm/llvm-project/commit/17631ac676bc44b7fd5c79abc66844efb4e1b533.diff LO

[PATCH] D132640: [clang-tidy] Fix modernize-use-emplace to support alias cases

2022-08-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Can you mention this change in the Release Notes (clang-tools-extra/docs/ReleaseNotes.rst). Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp:1059 priority_queue.emplace(Foo(13)); // CHECK-MESSAGES: :[[@LINE-1]]

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-25 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 455796. ahatanak added a comment. Revert the changes made to InstrProfData.inc and renamed the variables in InstrProfilingWriter.c instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131714/new/ https://re

[clang] 8712ed5 - [clang-format][NFC] Call eof() and isEOF() in UnwrappedLineParser

2022-08-25 Thread via cfe-commits
Author: owenca Date: 2022-08-25T22:07:03-07:00 New Revision: 8712ed5af1117f079be06780e9c77815d1876af2 URL: https://github.com/llvm/llvm-project/commit/8712ed5af1117f079be06780e9c77815d1876af2 DIFF: https://github.com/llvm/llvm-project/commit/8712ed5af1117f079be06780e9c77815d1876af2.diff LOG: [

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 455793. inclyc added a comment. Trim whitespace in format.mm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132568/new/ https://reviews.llvm.org/D132568 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D132186: Clang: Add a new flag Wmisnoinline for printing hot noinline functions

2022-08-25 Thread Archit Saxena via Phabricator via cfe-commits
iamarchit123 added a comment. @paulkirth this change was done under the intuition that marking hot functions noinline may hurt performance. This change till now hasn't been tested for performance improvements and so the points that you raise that functions marked noinline are marked not for ho

[PATCH] D132136: [clang] Perform implicit lvalue-to-rvalue cast with new interpreter

2022-08-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Can I get another opinion on this before the weekend? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132136/new/ https://reviews.llvm.org/D132136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D132136: [clang] Perform implicit lvalue-to-rvalue cast with new interpreter

2022-08-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 455792. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132136/new/ https://reviews.llvm.org/D132136 Files: clang/lib/AST/ExprConstant.cpp clang/test/AST/Interp/literals.cpp Index: clang/test/AST/Interp/literals.cpp ==

[PATCH] D132286: [clang][Interp] Implement function calls

2022-08-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 455791. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132286/new/ https://reviews.llvm.org/D132286 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/EvalEmitter.cpp clang/lib/AST/Inter

[PATCH] D132186: Clang: Add a new flag Wmisnoinline for printing hot noinline functions

2022-08-25 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. To be clear, I'm not morally opposed to your patch, I just wanted to understand the context more completely and why this is the best approach. And like I said, I can't recall encountering a place where `noinline` was done for performance reasons. Code size and correct

[PATCH] D132712: [Clang] Fix assert in Sema::LookupTemplateName so that it does not attempt an unconditional cast to TagType

2022-08-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 455784. shafik added a comment. Apply clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132712/new/ https://reviews.llvm.org/D132712 Files: clang/lib/Sema/SemaTemplate.cpp clang/test/SemaCXX/member-expr.cpp Index: clang/test/SemaCXX/m

[PATCH] D131388: [docs] Add "Standard C++ Modules"

2022-08-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D131388#3748769 , @ruoso wrote: > I just noticed that the document was implying that Header Units were separate > from the Standard C++ Modules, but they are an integral part of the language > in the specification of module

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-08-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: gribozavr2, njames93. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov requested revie

[PATCH] D132712: [Clang] Fix assert in Sema::LookupTemplateName so that it does not attempt an unconditional cast to TagType

2022-08-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: erichkeane, aaron.ballman. Herald added a project: All. shafik requested review of this revision. In `Sema::LookupTemplateName(...)` seeks to assert that the `ObjectType` is complete or being defined. If the type is incomplete it will attempt

[PATCH] D131919: Move googletest to the third-party directory

2022-08-25 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D131919#3749850 , @Meinersbur wrote: > Semi-OT: `polly\lib\External` has 3 more third-party libraries. Two of them > have been heavily modified in-tree, the third has just a custom > CMakeLists.txt. > Should these eventual

[PATCH] D132711: [HLSL] add sqrt library function

2022-08-25 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 created this revision. bob80905 added reviewers: beanz, pow2clk. Herald added a subscriber: Anastasia. Herald added a project: All. bob80905 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change exposes the sqrt library funct

[clang] 18385cf - [HLSL] Add abs library function

2022-08-25 Thread Chris Bieneman via cfe-commits
Author: Chris Bieneman Date: 2022-08-25T18:56:51-05:00 New Revision: 18385cffc50a6e549dcf3306cbe8a99e10a11fff URL: https://github.com/llvm/llvm-project/commit/18385cffc50a6e549dcf3306cbe8a99e10a11fff DIFF: https://github.com/llvm/llvm-project/commit/18385cffc50a6e549dcf3306cbe8a99e10a11fff.diff

[PATCH] D131718: [HLSL] Add abs library function

2022-08-25 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG18385cffc50a: [HLSL] Add abs library function (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131718/new/ https://reviews.llvm.org/D13171

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-08-25 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin updated this revision to Diff 455758. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119147/new/ https://reviews.llvm.org/D119147 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Driver/Job.h clang/lib/Driver/Job.cpp clang/lib

[PATCH] D132538: [AArch64] Filter out invalid code model in frontend.

2022-08-25 Thread Hsiangkai Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa8690143057b: [AArch64] Filter out invalid code model in frontend. (authored by HsiangKai). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132538/new/ https:

[clang] a869014 - [AArch64] Filter out invalid code model in frontend.

2022-08-25 Thread Hsiangkai Wang via cfe-commits
Author: Hsiangkai Wang Date: 2022-08-25T23:28:28Z New Revision: a8690143057b3e11c5aea5a45fcbabe3fd23b70b URL: https://github.com/llvm/llvm-project/commit/a8690143057b3e11c5aea5a45fcbabe3fd23b70b DIFF: https://github.com/llvm/llvm-project/commit/a8690143057b3e11c5aea5a45fcbabe3fd23b70b.diff LOG

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-25 Thread Denis Nikitin via Phabricator via cfe-commits
denik accepted this revision. denik added inline comments. Comment at: clang/lib/Frontend/SARIFDiagnostic.cpp:58 + + if (Loc.isValid()) +Result = addLocationToResult(Result, Loc, PLoc, Ranges, *Diag); abrahamcd wrote: > denik wrote: > > I think we should add

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-25 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd updated this revision to Diff 455729. abrahamcd added a comment. Ran clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131632/new/ https://reviews.llvm.org/D131632 Files: clang/include/clang/Frontend/SARIFDiagnostic.h clang

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-25 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Frontend/SARIFDiagnosticPrinter.cpp:53 + OS.flush(); +} + aaron.ballman wrote: > Should we be invalidating that `SARIFDiag` object here so the printer cannot > be used after the source file has ended? I suggeste

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-25 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd added inline comments. Comment at: clang/include/clang/Frontend/SARIFDiagnostic.h:45-47 + void emitCodeContext(FullSourceLoc Loc, DiagnosticsEngine::Level Level, + SmallVectorImpl &Ranges, + ArrayRef Hints) override {} --

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-25 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd updated this revision to Diff 455728. abrahamcd marked 15 inline comments as done. abrahamcd added a comment. Addressed some refactoring and reformatting comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131632/new/ https://reviews.

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson 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 rGb1c960fc6dc2: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions) (authored by royjacobson). Repository: rG LLVM Github Monor

[clang] b1c960f - [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via cfe-commits
Author: Roy Jacobson Date: 2022-08-26T00:52:52+03:00 New Revision: b1c960fc6dc2891c8d2ca09c184572ca0857ba15 URL: https://github.com/llvm/llvm-project/commit/b1c960fc6dc2891c8d2ca09c184572ca0857ba15 DIFF: https://github.com/llvm/llvm-project/commit/b1c960fc6dc2891c8d2ca09c184572ca0857ba15.diff

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 455721. royjacobson added a comment. Formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/DeclCXX.cpp

[PATCH] D132600: [llvm-profdata] Handle internal linkage functions in profile supplementation

2022-08-25 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram accepted this revision. tmsriram added inline comments. Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:589 + +if (SampleProfileHasFUnique) { + // If profile also uses funqiue, nothing to do here. Maybe rewrite this slightly as: // If S

[PATCH] D132186: Clang: Add a new flag Wmisnoinline for printing hot noinline functions

2022-08-25 Thread Archit Saxena via Phabricator via cfe-commits
iamarchit123 added a comment. In D132186#3741210 , @paulkirth wrote: > Hi, thanks for taking a look at this. Before we start an in-depth review, can > you describe the deficiencies w/ the existing diagnostics, and why they don't > meet your needs? > > P

[PATCH] D132600: [llvm-profdata] Handle internal linkage functions in profile supplementation

2022-08-25 Thread David Li via Phabricator via cfe-commits
davidxl accepted this revision. davidxl added a comment. This revision is now accepted and ready to land. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132600/new/ https://reviews.llvm.org/D132600 ___ cfe-commits mailing list cfe-commits

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-08-25 Thread David Tenty via Phabricator via cfe-commits
daltenty added a comment. Suggest adding the following text to `clang/docs/ReleaseNotes.rst` under the AIX section with this change: * When using `-shared`, the clang driver now invokes llvm-nm to create an export list if the user doesn't specify one via linker flag or pass an alternative ex

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-25 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D131714#3750091 , @ahatanak wrote: > It's still failing. It looks like I have to add checks for other flags too. Thank you! Windows bot is fixed https://lab.llvm.org/buildbot/#/builders/127/builds/34851 Repository: rG

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-25 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir marked 6 inline comments as done. benlangmuir added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:165 +if (Scanned) { + // If we have already scanned an upstream command, just forward to the

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-25 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 455712. benlangmuir added a comment. - handleBuildCommand now takes a Command - Removed now-unused forward decl - Expanded comment about scan-once behaviour - Moved all calls to handleBuildCommand to a single place - Added comments to new tests CHANGES S

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-08-25 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin added a comment. if there is no more comment. Can you help to approve it ?, thanks in advance. @MaskRay @daltenty Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119147/new/ https://reviews.llvm.org/D119147 ___

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/Format.cpp:649 IO.mapOptional("AlignOperands", Style.AlignOperands); -IO.mapOptional("AlignTrailingComments", Style.AlignTrailingComments); IO.mapOptional("AllowAllArgumentsOnNextLine", -

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-25 Thread Haowei Wu via Phabricator via cfe-commits
haowei added subscribers: mcgrathr, phosek, gulfem. haowei added a comment. After looking into the code, I think I should point out that `compiler-rt/include/profile/InstrProfData.inc` is a published header and its API details cannot be changed trivially without coordination with external users

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-25 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. We are also saw failures on Fuchsia builders when using ToT clang: [31281/267743] CXX host_x64/obj/src/lib/llvm-profdata/llvm-profdata-for-test.llvm-profdata.cc.o FAILED: host_x64/obj/src/lib/llvm-profdata/llvm-profdata-for-test.llvm-profdata.cc.o ../../../recipe_c

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:27 +namespace driver { +class Command; +} Not needed anymore, I assume. Comment at: clang/include/clang/Tooling/Dependen

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 455696. royjacobson added a comment. We call LookupSpecialMember before we compute eligibility, so the assert fails. Remove it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llv

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a subscriber: arphaman. dexonsmith added inline comments. Comment at: clang/test/FixIt/format.m:195-208 - NSLog(@"%C", 0x260300); // expected-warning{{format specifies type 'unichar' (aka 'unsigned short') but the argument has type 'int'}} - // CHECK-NOT: fix

[PATCH] D119651: [clang] Fix evaluation context type for consteval function calls in instantiations

2022-08-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. FYI: Alternative fix for this issue: https://reviews.llvm.org/D132659 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119651/new/ https://reviews.llvm.org/D119651 ___ cfe-commits

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 455689. royjacobson added a comment. Rename file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128619/new/ https://reviews.llvm.org/D128619 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/DeclCXX.cpp

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/conditionally-trivial-smfs-1.cpp:1 +// RUN: %clang_cc1 -std=c++20 -triple x86_64-pc-linux -ast-dump=json %s | FileCheck %s --check-prefixes=CHECK,LIN +// RUN: %clang_cc1 -std=c++20 -triple x86_64-pc-win32 -ast-dump=json

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I added handling of FunctionTemplateDecls in SemaDecl because they can be default constructors. This caused errors with std::pair for example - it has two enable_ifs constructors to control explicit/implicit construction. I will try committing again if the pre-commi

[PATCH] D128619: [Clang] Implement P0848 (Conditionally Trivial Special Member Functions)

2022-08-25 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 455686. royjacobson added a comment. Default constructors can be template functions. Update patch to handle them correctly, and add asserts to LookupSpecialMember that can catch similar problems. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-25 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. It's still failing. It looks like I have to add checks for other flags too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131714/new/ https://reviews.llvm.org/D131714 ___ cfe-co

[PATCH] D132695: [Clang] Avoid crashes when parsing using enum declarations

2022-08-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Changes seem correct enough, and the tests all look like we're just removing incorrect diagnostics, so LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132695/new/ https:/

[PATCH] D128401: [clang-tidy] Fixing a bug raising false alarms on static local variables in the Infinite Loop Checker

2022-08-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:194 + } + return ContainsFunc && Overlap; +} njames93 wrote: > This will always be false as if it's true, the loop would return. Thanks for pointing this

[PATCH] D132600: [llvm-profdata] Handle internal linkage functions in profile supplementation

2022-08-25 Thread Rong Xu via Phabricator via cfe-commits
xur updated this revision to Diff 455682. xur added a comment. Fixed unneeded & CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132600/new/ https://reviews.llvm.org/D132600 Files: clang/lib/CodeGen/CodeGenModule.cpp llvm/include/llvm/ProfileData/SampleProf.h llvm/test/tools/llvm-pr

[PATCH] D132695: [Clang] Avoid crashes when parsing using enum declarations

2022-08-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: erichkeane, aaron.ballman. Herald added a project: All. shafik requested review of this revision. In `Parser::ParseUsingDeclaration(...)` when we call `ParseEnumSpecifier(...)` it is not calling `SetTypeSpecError()` on `DS` when it detects an

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 5 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/AST/Decl.cpp:5228-5230 + if (DC != LexicalParent) { +Result->setLexicalDeclContext(LexicalParent); + } aaron.ballman wrote: > So semantically these are al

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10127-10129 +if (ImplicitMatch != ArgType::NoMatchPromotionTypeConfusion && +ImplicitMatch != ArgType::NoMatchTypeConfusion && +!IsCharacterLiteralInt) nickdesaulniers w

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-25 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Fixed in 387a05dbfa21631e924ee8dc30a0f8db8e29c3b2 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131714/new/ https://reviews.llvm.org/D131714

[PATCH] D131683: Diagnosing the Future Keywords

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I spotted one last (hopefully) concern, but otherwise this LG for functionality. Can you also add a release note for the improved diagnostic behavior? Comment at: clang/include/clang/Basic/TokenKinds.def:381-383 +C2X_KEYWORD(bool

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-25 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Frontend/SARIFDiagnostic.cpp:191 +#ifdef _WIN32 + TmpFilename = (*File)->getName(); + llvm::sys::fs::make_absolute(TmpFilename); denik wrote: > cjdb wrote: > > aaron.ballman wrote: > > > Note: this is no

[PATCH] D132503: [clang] Add cxx scope if needed for requires clause.

2022-08-25 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google added a comment. Yes please, I'm hoping to earn committer rights with a series of C++20 patches :). Name is Luke Nihlen, email is lu...@google.com, github ID is luken-google@. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1325

[PATCH] D132691: [clang] Do not instrument the rtti_proxies under hwasan

2022-08-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: mcgrathr, phosek. leonardchan added a project: clang. Herald added a subscriber: kristof.beyls. Herald added a project: All. leonardchan requested review of this revision. We run into a duplicate symbol error when instrumenting the rt

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 455672. python3kgae marked 10 inline comments as done. python3kgae added a comment. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Add more comment about no name conflict for cbuffer. Add Serialize and JSON dump for HLSLBufferDecl

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 455671. inclyc added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132568/new/ https://reviews.llvm.org/D132568 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/FormatS

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132659/new/ https://reviews.llvm.org/D132659

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-25 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:204 + /// invocation, for example when there are multiple chained invocations. + void handleInvocation(CompilerInvocation CI); + jansvoboda11 wro

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 455668. usaxena95 added a comment. Added release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132659/new/ https://reviews.llvm.org/D132659 Files: clang/docs/ReleaseNotes.rst clang/include/clang/S

[PATCH] D132503: [clang] Add cxx scope if needed for requires clause.

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution? Comment at: clang/docs/Releas

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-25 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 455666. benlangmuir added a comment. - Rebased, picking up the changes that were previously split out. - Broke up applying changes to CI from passing to consumer. The MDC is no longer responsible for passing invocations to the consumer, and it is done at

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 455667. usaxena95 marked 6 inline comments as done. usaxena95 added a comment. Thanks for the quick review. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132659/new/ https://reviews.llvm.o

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10133-10135 + if (ImplicitMatch == ArgType::NoMatchPedantic || + ImplicitMatch == ArgType::NoMatchTypeConfusion) +Match = ImplicitMatch; nickdesaulniers wrote: > Similarl

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10133-10135 + if (ImplicitMatch == ArgType::NoMatchPedantic || + ImplicitMatch == ArgType::NoMatchTypeConfusion) +Match = ImplicitMatch; Similarly, if `ImplicitMatch` can

[PATCH] D132607: [OffloadPackager] Add ability to extract mages from other file types

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 455664. jhuber6 added a comment. CMake changes no longer needed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132607/new/ https://reviews.llvm.org/D132607 Files: clang/test/Driver/offload-packager.c clang/

[PATCH] D132607: [OffloadPackager] Add ability to extract mages from other file types

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 455663. jhuber6 added a comment. Updating after refactoring extraction code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132607/new/ https://reviews.llvm.org/D132607 Files: clang/test/Driver/offload-packag

[PATCH] D132550: Changes to code ownership in clang and clang-tidy

2022-08-25 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/CODE_OWNERS.TXT:80 +D: Attributes, Templates + N: Reid Kleckner N: Matheus Izvekov E: mizve...@gmail.com H: mizvekov D: Templates, Type Deduction, Type System Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D131919: Move googletest to the third-party directory

2022-08-25 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. Semi-OT: `polly\lib\External` has 3 more third-party libraries. Two of them have been heavily modified in-tree, the third has just a custom CMakeLists.txt. Should these eventually also be moved? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10127-10129 +if (ImplicitMatch != ArgType::NoMatchPromotionTypeConfusion && +ImplicitMatch != ArgType::NoMatchTypeConfusion && +!IsCharacterLiteralInt) There's

[PATCH] D130831: [CodeGen] Track DeferredDecls that have been emitted

2022-08-25 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. Let's move forward with this patch and rely on a post-commit review if necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1308

[PATCH] D132689: [Object] Refactor code for extracting offload binaries

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, saiislam, JonChesterfield, tra, yaxunl. Herald added subscribers: hiraditya, mgorny. Herald added a project: All. jhuber6 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits,

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/FormatString.cpp:401 + if (const auto *BT = argTy->getAs()) { +if (!Ptr) { + switch (BT->getKind()) { inclyc wrote: > nickdesaulniers wrote: > > aaron.ballman wrote: > > > It's

[PATCH] D132672: [Docs] [HLSL] Documenting HLSL Entry Functions

2022-08-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/docs/HLSL/EntryFunctions.rst:11 + +In HLSL entry functions denote the starting point for shader execution. They +must be known at compile time. For all non-library shaders, the compiler assumes In HLSL,

[PATCH] D132600: [llvm-profdata] Handle internal linkage functions in profile supplementation

2022-08-25 Thread David Li via Phabricator via cfe-commits
davidxl added inline comments. Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:564 + auto buildStaticFuncMap = [&StaticFuncMap, + SampleProfileHasFUnique](const StringRef &Name) { +std::string Prefixes[] = {".cpp:", "cc:", ".c:", ".hpp:", "

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 455645. inclyc added a comment. Remove wchar tests. These tests may need to be re-added after we have implemented `wchar_t` checks in C Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132568/new/ https://reviews

[PATCH] D131639: [OpenMP] Remove 'stdbool.h' from OpenMP header wrappers

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D131639#3749582 , @ivanrodriguez3753 wrote: > They are defining their own `bool`, which aliases to the built-in `_Bool` > (which is reserved, as you noted with `_[A-Z]`). I thought `bool` was fair > game unless they included

[PATCH] D131919: Move googletest to the third-party directory

2022-08-25 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: clang/CMakeLists.txt:106 AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt) add_subdirectory(${UNITTEST_DIR} utils/unittest) endif() Should this be `third-party/unittest` ? Looking at how the lldb cm

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-25 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. This patches breaks windows bot https://lab.llvm.org/buildbot/#/builders/127/builds/34791 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131714/new/ https://reviews.llvm.org/D131714 _

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: cor3ntin, aaron.ballman, clang-language-wg. aaron.ballman added a comment. Adding a few more reviewers just in case, but this is generally looking good. Please also add a release note for the fix! Comment at: clang/include/clang/Sema/Sema.h:1355

[PATCH] D132659: PotentiallyEvaluatedContext in a ImmediateFunctionContext.

2022-08-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Yes, this looks good to me too. Thanks for working on this. Can you modify ReleaseNotes.rst to mention the fixed issue? Comment at: clang/include/clang/Sema/Sema.h:1355 + InImmediateFunctionContext) || + // [expr.const#def:imm

[PATCH] D131639: [OpenMP] Remove 'stdbool.h' from OpenMP header wrappers

2022-08-25 Thread Ivan Rodriguez via Phabricator via cfe-commits
ivanrodriguez3753 added a comment. They are defining their own `bool`, which aliases to the built-in `_Bool` (which is reserved, as you noted with `_[A-Z]`). I thought `bool` was fair game unless they included `stdbool.h`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D132600: [llvm-profdata] Handle internal linkage functions in profile supplementation

2022-08-25 Thread Rong Xu via Phabricator via cfe-commits
xur updated this revision to Diff 455640. xur added a comment. Integrated David's review commends. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132600/new/ https://reviews.llvm.org/D132600 Files: clang/lib/CodeGen/CodeGenModule.cpp llvm/include/llvm/ProfileData/SampleProf.h llvm

[PATCH] D132592: [Clang] Implement function attribute nouwtable

2022-08-25 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Thanks for taking a look! In D132592#3749261 , @aaron.ballman wrote: > Do we have any evidence that users need this level of control or will > understand how to properly use the attribute? The command line option makes > sense t

[PATCH] D131639: [OpenMP] Remove 'stdbool.h' from OpenMP header wrappers

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D131639#3749563 , @ivanrodriguez3753 wrote: > The user didn't define any `__` or `_[A-Z]` identifiers, though? Am I misunderstanding the test input? /* Visual Studio < 2013 does not have stdbool.h so here it is a replaceme

[PATCH] D131639: [OpenMP] Remove 'stdbool.h' from OpenMP header wrappers

2022-08-25 Thread Ivan Rodriguez via Phabricator via cfe-commits
ivanrodriguez3753 added a comment. The user didn't define any `__` or `_[A-Z]` identifiers, though? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131639/new/ https://reviews.llvm.org/D131639 ___ cfe-comm

[PATCH] D132568: [clang][Sema] check default argument promotions for printf

2022-08-25 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/AST/FormatString.cpp:401 + if (const auto *BT = argTy->getAs()) { +if (!Ptr) { + switch (BT->getKind()) { nickdesaulniers wrote: > aaron.ballman wrote: > > It's a bit strange that we have t

  1   2   >