[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:116-117 "source file is not valid UTF-8">; +def warn_invalid_utf8_in_comment : Warning< + "invalid UTF-8 in comment">, InGroup>, DefaultIgnore; def err_character_not_allowed : Err

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 439047. cor3ntin added a comment. Vectorizes comment skipping even when -Winvalid-utf8 is enabled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128059/new/ https://reviews.llvm.org/D128059 Files: clang/doc

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 439048. samestep added a comment. Try to fix the broken patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127898/new/ https://reviews.llvm.org/D127898 Files: clang/docs/tools/clang-formatted-files.txt c

[PATCH] D128352: [clang][dataflow] Use diagnosis API in optional checker

2022-06-22 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:58 BlockToOutputState = - dataflow::runDataflowAnalysis(*Context, Analysis, Env); + dataflow::runTypeErasedDataflowAnalysis(*Context, Analysi

[PATCH] D128352: [clang][dataflow] Use diagnosis API in optional checker

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:58 BlockToOutputState = - dataflow::runDataflowAnalysis(*Context, Analysis, Env); + dataflow::runTypeErasedDataflowAnalysis(*Context, Analy

[PATCH] D128352: [clang][dataflow] Use diagnosis API in optional checker

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 439052. samestep added a comment. - Merge branch 'diagnose-api' into optional-check-diagnose Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128352/new/ https://reviews.llvm.org/D128352 Files: clang-tools-ext

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 439057. cor3ntin added a comment. Further optimize Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128059/new/ https://reviews.llvm.org/D128059 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/D

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman I created a 1.3GB file containing 50 comments of random size and content, with the following script import string import random for i in range(0, 50): print("/*{}*/".format(''.join(random.choices('\n' + string.ascii_uppercase + str

[PATCH] D128282: [WebAssembly] Update test to run it in opaque pointers mode

2022-06-22 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D128282#3601100 , @asb wrote: > In D128282#3600355 , @tlively wrote: > >> I think the lines still differ in that one tests wasm32 and the other tests >> wasm64 (the triples are differe

[PATCH] D128355: [clangd][NFC] Unify ancestor logic for config and tidy provider.

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-e

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep marked an inline comment as not done. samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76 +class UncheckedOptionalAccessDiagnosis { +public: samestep wrote: > sgatev wrote: >

[clang-tools-extra] b967a97 - [clang-tidy] Fix documentation (NFC)

2022-06-22 Thread via cfe-commits
Author: Richard Date: 2022-06-22T10:49:00-06:00 New Revision: b967a9755064b9d494523c7991fd995bc14f7b4c URL: https://github.com/llvm/llvm-project/commit/b967a9755064b9d494523c7991fd995bc14f7b4c DIFF: https://github.com/llvm/llvm-project/commit/b967a9755064b9d494523c7991fd995bc14f7b4c.diff LOG:

[PATCH] D128356: [clang][dataflow] Use NoopLattice in optional model

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. samestep requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D1

[PATCH] D128357: [clang][dataflow] Store flow condition constraints in a single `FlowConditionConstraints` map.

2022-06-22 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A flow condition is represented with an atomic boolean token, and it is boun

[PATCH] D125723: [MSVC] Add initial support for MSVC pragma optimize

2022-06-22 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. Hi, I'll land this on Friday. Let me know if there are any comments. Also, I'm not sure how to rebase it on top of main. At the moment, it's still on top of D126984 (i.e. stack has one open) Repository: rG LLVM Github Monorepo CHA

[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct

2022-06-22 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D127873#3600978 , @jackhong12 wrote: > Thanks. I am not sure which modification will be better, the patch I > submitted or the following code. > > FormatToken *BeforeLBraceToken = nullptr; > if (MatchingLBrace) > Befo

[PATCH] D128359: [clang][dataflow] Move logic for `createStorageLocation` from `DataflowEnvironment` to `DataflowAnalysisContext`.

2022-06-22 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `createStorageLocation` in `DataflowEnvironment` is now a trivial wrapper a

[PATCH] D125723: [MSVC] Add initial support for MSVC pragma optimize

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3798 +``#pragma optimize("[optimization-list]", on | off)``. At the moment, Clang only +supports an empty optimization list, whereas MSVC supports the parameters, ``s``, +``g``, ``t``, and ``y``.

[PATCH] D128056: [clang][dataflow] Singleton pointer values for null pointers.

2022-06-22 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 439078. wyt added a comment. Use QualType as key to singleton map, implement getOrCreate factory function for retrieving null pointer values. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128056/new/ https://revie

[PATCH] D128357: [clang][dataflow] Store flow condition constraints in a single `FlowConditionConstraints` map.

2022-06-22 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:138-150 + auto ConstraintsIt = FlowConditionConstraints.find(&Token); + if (ConstraintsIt == Fl

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-22 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76 +class UncheckedOptionalAccessDiagnosis { +public: samestep wrote: > samestep wrote: > > sgatev wrote: > > > Move this to a new Unchec

[clang] 7597988 - [LinkerWrapper][NFC] Change interface to use a StringRef to TempFiles

2022-06-22 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-22T13:16:37-04:00 New Revision: 75979887291426acd282d638795913697b65cecb URL: https://github.com/llvm/llvm-project/commit/75979887291426acd282d638795913697b65cecb DIFF: https://github.com/llvm/llvm-project/commit/75979887291426acd282d638795913697b65cecb.diff

[PATCH] D128043: [flang][driver] Add support for `-O{0|1|2|3}`

2022-06-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:133 + CmdArgs.push_back("-O3"); + TC.getDriver().Diag(diag::warn_O4_is_O3); +} else { peixin wrote: > Nit: I have committed D126164, and you can rebase and use D dir

[PATCH] D128043: [flang][driver] Add support for `-O{0|1|2|3}`

2022-06-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 439086. awarzynski added a comment. Use `D` instead of `TC.getDriver()` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128043/new/ https://reviews.llvm.org/D128043 Files: clang/include/clang/Driver/Options

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-22 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y marked an inline comment as done. vaibhav.y added a comment. Thanks, will push changes to address the comments soon. As I understood from our discussion the work @cjdb has planned would create a new `DiagnosticsConsumer`, it can be started in parallel but would need the changes in D10

[PATCH] D128359: [clang][dataflow] Move logic for `createStorageLocation` from `DataflowEnvironment` to `DataflowAnalysisContext`.

2022-06-22 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:91-92 + // FIXME: Rename `createOrGetStorageLocation` to `getOrCreateStorageLocation`, + // `getStableStorageLocation`, or something more appropriate. + --

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. It looks like precommit CI caught some issues: Failed Tests (2): Clangd :: utf8.test Clangd Unit Tests :: ./ClangdTests.exe/CompletionStringTest/GetDeclCommentBadUTF8 Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:116-117

[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct

2022-06-22 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 updated this revision to Diff 439091. jackhong12 added a comment. Right. It looks better. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127873/new/ https://reviews.llvm.org/D127873 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp clang/u

[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

2022-06-22 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch introduces `buildAndSubstituteFlowCondition` - given a flow cond

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-22 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y updated this revision to Diff 439096. vaibhav.y added a comment. Discard top-level const specifier where target isn't pointee/ref Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109701/new/ https://reviews.llvm.org/D109701 Files: clang/i

[PATCH] D125723: [MSVC] Add initial support for MSVC pragma optimize

2022-06-22 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 439097. steplong added a comment. - Fix up docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125723/new/ https://reviews.llvm.org/D125723 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2717 +__m128i Bytes = +_mm_loadu_si128(reinterpret_cast(CurPtr)); +int Mask = _mm_movemask_epi8(Bytes); This crashes when using `_mm_load_si128` which suprises me beca

[PATCH] D119296: KCFI sanitizer

2022-06-22 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 439099. samitolvanen added a comment. Switched from prefix data + attribute to a metadata node based on previous discussion. This seems to be a cleaner solution overall. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D128056: [clang][dataflow] Singleton pointer values for null pointers.

2022-06-22 Thread weiyi via Phabricator via cfe-commits
wyt marked an inline comment as done. wyt added a comment. @xazax.hun > Since you always want this function to create a null pointer value, I think > it would be less error prone to ask for the location instead of an arbitrary > value. Currently, a confused caller could put a non-null value int

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D127142#3601810 , @yaxunl wrote: > In D127142#3600809 , @MaskRay wrote: > >> Magically deciding a default value for --unwindlib or --rtlib is not nice. >> You may emit a warning if the

[PATCH] D128072: [clang-tidy] Organize test files into subdirectories by module (NFC)

2022-06-22 Thread Richard 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 rG89a1d03e2b37: [clang-tidy] Organize test files into subdirectories by module (NFC) (authored by LegalizeAdulthood). Changed prior to commit: https

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D113107#3601873 , @rjmccall wrote: > Supporting the lowering in the backend is sensible in order to support > `-fexcess-precision=16`, because I agree that the most reasonable IR output > in that configuration is to simply g

[PATCH] D128072: [clang-tidy] Organize test files into subdirectories by module (NFC)

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Just noticed something nice about this, cmake targets are generated for each module Should speed up development as you now only need to run the lit tests for the module that you are working on `check-clang-extra-clang-tidy-checkers-misc` etc Repository: rG LLVM Gith

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1845-1846 + } + if (getCodeGenOpts().EmitOpenCLArgMetadata || + getCodeGenOpts().HIPSaveKernelArgName) Fn->setMetadata("kernel_arg_name", Should we consolidate both options int

[PATCH] D127807: [clang-tidy] Properly forward clang-tidy output when running tests

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Thank you for this, it has been annoying me for a while. I'll give a tentative LG, but I'm no expert in this area so see what everyone else says first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127807/new/ https://rev

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 439110. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/X86.cpp

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76 +class UncheckedOptionalAccessDiagnosis { +public: sgatev wrote: > samestep wrote: > > samestep wrote: > > > sgatev wrote: > > > > M

[PATCH] D125723: [MSVC] Add initial support for MSVC pragma optimize

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125723/new/ https://reviews.llvm.org/D125723 ___ cfe-commits mailing list cfe-comm

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127686/new/ https://reviews.llvm.org/D127686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: abrahamcd. cjdb added a comment. I think this CL (which is quite large) might be worth just getting the functionality in, and deferring the in-tree usage to a second CL. That second CL probably should just lift the existing diagnostics so that they're in the message com

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 439113. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/X86.cpp

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-22 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:76 +class UncheckedOptionalAccessDiagnosis { +public: samestep wrote: > sgatev wrote: > > samestep wrote: > > > samestep wrote: > > > >

[PATCH] D128182: [NFC] Switch FloatModeKind enum class to use bitmask enums

2022-06-22 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 aside from a tiny naming nit. Thank you for the cleanup! Comment at: clang/include/clang/Basic/TargetInfo.h:895-896 bool useObjCFPRetForRealType(FloatMo

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-22 Thread Guillaume Gomez via Phabricator via cfe-commits
GuillaumeGomez updated this revision to Diff 439115. GuillaumeGomez added a comment. - Rename GCCBuiltin into ClangBuiltin - Update #define name as well - Rename `IsGCC` function parameter into `IsClang` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D128368: added clear check functionality

2022-06-22 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd created this revision. Herald added a subscriber: carlosgalvezp. Herald added a project: All. abrahamcd requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D1

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-22 Thread Amanieu d'Antras 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 rGd0a4450ecdaf: Rename GCCBuiltin into ClangBuiltin (authored by GuillaumeGomez, committed by Amanieu). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

2022-06-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:163 +BoolValue &Val, +llvm::DenseMap &SubstitutionsCache) { + auto It = SubstitutionsCache.find(&Val); Could you refactor it into a free function?

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2405-2406 // Skip over characters in the fast loop. -while (C != 0 &&// Potentially EOF. - C != '\n' && C != '\r') // Newline or DOS-style newline. +// Warn on invalid U

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1845-1846 + } + if (getCodeGenOpts().EmitOpenCLArgMetadata || + getCodeGenOpts().HIPSaveKernelArgName) Fn->setMetadata("kernel_arg_name", ---

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2717 +__m128i Bytes = +_mm_loadu_si128(reinterpret_cast(CurPtr)); +int Mask = _mm_movemask_epi8(Bytes); cor3ntin wrote: > This crashes when using `_mm_load_si128`

[PATCH] D128368: added clear check functionality

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. A great start, thanks! I understand this CL to have been sent out a few minutes in advance, so as a note to other reviewers: maybe check back in in ~20 minutes please? Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:52-55 +

[PATCH] D127812: [AArch64] Function multiversioning support added.

2022-06-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D127812#3601476 , @danielkiss wrote: > In D127812#3599530 , @aaron.ballman > wrote: > >> In D127812#3587223 , @ilinpv wrote: >> >>> In D12

[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

2022-06-22 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 2 inline comments as done. iains added a comment. In D128328#3601080 , @ChuanqiXu wrote: > It looks like we need to handle inline variable as well to match the > intention. can you construct a test-case, where this would apply and which is

[PATCH] D127812: [AArch64] Function multiversioning support added.

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D127812#3602645 , @erichkeane wrote: > In D127812#3601476 , @danielkiss > wrote: > >> Your understanding is correct. `target` attribute has two usage model. One >> is just rede

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 439128. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/X86.cpp

[PATCH] D128337: [clang-tidy] Extend spelling for CheckOptions

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I like the changes -- this is a much nicer syntax for specifying configuration options! > The only observable differences are support for the new syntax and > -dump=config will emit using the new syntax. Do you expect the behavior of `-dump` to cause any problems

[PATCH] D128328: [C++20][Modules] Improve handing of Private Module Fragment diagnostics.

2022-06-22 Thread Iain Sandoe via Phabricator via cfe-commits
iains marked 2 inline comments as done. iains added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11155 +def err_export_inline_not_defined : Error< + "exported inline functions must be defined within the module purview" + " and before any private

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2717 +__m128i Bytes = +_mm_loadu_si128(reinterpret_cast(CurPtr)); +int Mask = _mm_movemask_epi8(Bytes); aaron.ballman wrote: > cor3ntin wrote: > > This crashes wh

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 439130. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https://reviews.llvm.org/D113107 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/X86.cpp

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Abraham Corea Diaz via Phabricator via cfe-commits
abrahamcd created this revision. Herald added subscribers: carlosgalvezp, abrachet, phosek, mgorny. Herald added a project: All. abrahamcd requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang-tools-extr

[PATCH] D128373: [Sema] Check whether `__auto_type` has been deduced before merging

2022-06-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: aaron.ballman. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This fixes a bug in clang where it emits the following diagnostic when compiling the test case: `argument to 'sizeof

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D113107#3602478 , @zahiraam wrote: > Do we want to add an -fexcess-precision option? Well, generally we try to offer the same options GCC does. However, it looks like GCC's `-fexcess-precision` does not line up with the opt

[PATCH] D128314: [Clang-tidy] Fixing a bug in clang-tidy infinite-loop checker

2022-06-22 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 439132. ziqingluo-90 retitled this revision from "[Clang-tidy] Fixing bugs in clang-tidy infinite-loop checker" to "[Clang-tidy] Fixing a bug in clang-tidy infinite-loop checker". ziqingluo-90 edited the summary of this revision. ziqingluo-90 added a com

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-06-22 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D123319#3593644 , @aprantl wrote: > In D123319#3517966 , @dblaikie > wrote: > >> In D123319#3506745 , @shafik wrote: >> >>> >> >> What does

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Do we want JIT -> YES, but specalizing LLVM-IR JIT. Do we want/need PTX, I do not, but I don't mind having it. Someone will ask for it eventually. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127901/new/ https://reviews

[PATCH] D119296: KCFI sanitizer

2022-06-22 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 439137. samitolvanen added a comment. Fixed the debug output in InstCombine to use metadata as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119296/new/ https://reviews.llvm.org/D119296 Files: cla

[PATCH] D128059: [Clang] Add a warning on invalid UTF-8 in comments.

2022-06-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2717 +__m128i Bytes = +_mm_loadu_si128(reinterpret_cast(CurPtr)); +int Mask = _mm_movemask_epi8(Bytes); aaron.ballman wrote: > aaron.ballman wrote: > > cor3ntin wrote:

[PATCH] D128337: [clang-tidy] Extend spelling for CheckOptions

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D128337#3602694 , @aaron.ballman wrote: > I like the changes -- this is a much nicer syntax for specifying > configuration options! > >> The only observable differences are support for the new syntax and >> -dump=config wil

[clang-tools-extra] b1cc59f - [clang-tidy][docs] Reorganise release notes

2022-06-22 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2022-06-22T21:21:24+01:00 New Revision: b1cc59fd3a9bad2fbd654011613909ffe90329b0 URL: https://github.com/llvm/llvm-project/commit/b1cc59fd3a9bad2fbd654011613909ffe90329b0 DIFF: https://github.com/llvm/llvm-project/commit/b1cc59fd3a9bad2fbd654011613909ffe90329b0.diff

[PATCH] D128337: [clang-tidy] Extend spelling for CheckOptions

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 439139. njames93 marked an inline comment as done. njames93 added a comment. Rebased and addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128337/new/ https://reviews.llvm.org/D128337 Files:

[clang-tools-extra] 165d693 - [clang-tidy][docs] Fix a couple of missed cases from 6e566bc5523

2022-06-22 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2022-06-22T21:37:16+01:00 New Revision: 165d69337a7dbcb88dc054ac8fc3e43f623d4ba7 URL: https://github.com/llvm/llvm-project/commit/165d69337a7dbcb88dc054ac8fc3e43f623d4ba7 DIFF: https://github.com/llvm/llvm-project/commit/165d69337a7dbcb88dc054ac8fc3e43f623d4ba7.diff

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. A great start, thanks! Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:51-57 +auto Methods = MemberCall->getRecordDecl()->methods(); +auto Clear = llvm::find_if(Methods, [](const CXXMethodDecl *F) { + return F->getDe

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-e

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Just for reference: https://reviews.llvm.org/D128267 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 ___ cfe-commits mailing list cfe-

[PATCH] D128157: [clang-tidy] cppcoreguidelines-virtual-class-destructor: Fix crash when "virtual" keyword is expanded from a macro

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Please rebase this and folder your changes into `checkers/cppcoreguidelines/virtual-class-destructor.cpp` Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D128372#3602881 , @tschuett wrote: > Just for reference: > https://reviews.llvm.org/D128267 Ack. I still think this CL is useful, given that not every library will have `[[nodiscard]]`, and because it can suggest appropriate alt

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:61 + "ignoring the result of 'empty()', did you mean 'clear()'? "); + Builder << FixItHint::CreateReplacement(ReplacementRange, "clear"); +} -

[PATCH] D126880: [clang-tidy] Add cppcoreguidelines-avoid-const-or-ref-data-members check

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Tests and docs have moved to subdirectories by module name. Please rebase onto HEAD and: - move `test/clang-tidy/checkers/cppcoreguidelines-avoid-const-or-ref-

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-22 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y updated this revision to Diff 439153. vaibhav.y added a comment. Fix formatting in Sarif.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109701/new/ https://reviews.llvm.org/D109701 Files: clang/include/clang/Basic/Sarif.h clang/incl

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto main:HEAD and: - fold your changes into the appropriate subdirs, strippin

[PATCH] D127293: [clang-tidy] Ignore other members in a union if any member of it is initialized in cppcoreguidelines-pro-type-member-init

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs, stripp

[PATCH] D127036: [clang-tidy] Warn about arrays in `bugprone-undefined-memory-manipulation`

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs, stripp

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs, stripp

[PATCH] D119165: [clang-tidy] Add processing lambda captures at bugprone-use-after-move check

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs, stripp

[PATCH] D126735: [clang-tidy] Silence modernize-redundant-void-arg in the case of vexing parses

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs, stripp

[PATCH] D126097: [clang-tidy] Adds the NSDateFormatter checker to clang-tidy

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs, stripp

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1845-1846 + } + if (getCodeGenOpts().EmitOpenCLArgMetadata || + getCodeGenOpts().HIPSaveKernelArgName) Fn->setMetadata("kernel_arg_name", yaxunl wrote: > yaxunl wrote: > > tra

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D127901#3602771 , @jdoerfert wrote: > Do we want/need PTX, I do not, but I don't mind having it. Someone will ask > for it eventually. Fair enough. > However, if we embed bitcode via LTO we can use the > single-linked PTX image

[PATCH] D128142: [MemProf] Memprof profile matching and annotation

2022-06-22 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish added a comment. I'm still going through PGOInstrumentation.cpp ... Comment at: clang/test/CodeGen/memprof.cpp:15 +// # Collect memory profile: +// $ clang++ -fuse-ld=lld -Wl,-no-pie -Wl,--no-rosegment -gmlt \ +// -fdebug-info-for-profiling -mno-omit-leaf-frame-p

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM with a nit. Comment at: clang/test/Driver/openmp-offload-gpu-new.c:117 + +// CHECK-LTO-FEATURES: clang-offload-packager{{.*}}feature={{.*}}ptx tra wrote: > jh

[PATCH] D128357: [clang][dataflow] Store flow condition constraints in a single `FlowConditionConstraints` map.

2022-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. I found a small nit inline, otherwise looks good. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:76 + if (!Res.second) { +FlowConditionConstraints[&Token] = +&getOrCreateConjunct

[PATCH] D128356: [clang][dataflow] Use NoopLattice in optional model

2022-06-22 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Herald added a subscriber: rnkovacs. Should this PR delete `SourceLocationsLattice`? Are there other users left or do we anticipate new users in the future? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D127901: [LinkerWrapper] Add PTX output to CUDA fatbinary in LTO-mode

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D127901#3603006 , @tra wrote: > Then we do need a knob controlling whether we do want to embed PTX or not. > The default should be "off" IMO. > We currently have `--[no-]cuda-include-ptx=` we may reuse for that purpose. We co

[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into the appropriate subdirs, stripp

[PATCH] D117593: [clang-tidy] Change google-explicit-constructor to ignore conversions and operators marked `explicit(false)`

2022-06-22 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Herald added a project: All. Clang-Tidy tests and docs have moved to module subdirectories. Please rebase this onto `main:HEAD` and: - fold your changes into th

<    1   2   3   >