[PATCH] D107040: [clangd] Make use of diagnostic tags for some clang diags

2021-07-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. It is not great to list diag id

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. If we are tinkering with the code post-acceptance, could you please also change `const char *` to `StringRef`? They are the same thing essentially, but accessing the length is (AFIAK) //O(1)// and there isn't a //concerning// `strlen` call in the code. CHANGES SINC

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:85 + if (TypePtr->isEnumeralType()) +InitializationString = ""; + else if (TypePtr->isIntegerType()) Also, if we're using //Optional//, this

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:85 + if (TypePtr->isEnumeralType()) +InitializationString = ""; + else if (TypePtr->isIntegerType()) whisperity wrote: > Also, if we're usin

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-29 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 362663. Sockke added a comment. You made it very clear, thanks a lot! @whisperity CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106431/new/ https://reviews.llvm.org/D106431 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.c

[PATCH] D106773: [clang-format] Fix aligning with linebreaks #2

2021-07-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. This bug fix should probably be cherry-picked into 13.x branch. WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106773/new/ https://reviews.llvm.org/D106773 ___ cfe-commits

[PATCH] D106939: [RISCV] If the maskedoff is vundefined(), use ta, ma for vsetvli.

2021-07-29 Thread Fraser Cormack via Phabricator via cfe-commits
frasercrmck added a comment. LGTM but there are test failures. Is that just a whole load of `mu->ma` changes that have been omitted for a smaller diff? Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:379 bool ForceTailAgnostic = RISCVII::doesForceTailAgnostic(TSFla

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Andy Yankovsky via Phabricator via cfe-commits
werat added a comment. > Hi! Thanks for the patch, it makes sense to me! Honestly, I think having the > open shadow is maybe not the best way to solve this (please feel free to let > me know if there are reasons it would be better), maybe spell it out > explicitly (there aren't that many cases

[PATCH] D106644: [clang][analyzer] Add standard streams to alpha.unix.Stream checker.

2021-07-29 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:215-236 +const VarDecl *findStdStreamDecl(StringRef StdName, CheckerContext &C) { + ASTContext &ACtx = C.getASTContext(); + + IdentifierInfo &II = ACtx.Idents.get(StdName); + auto Lo

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Andy Yankovsky via Phabricator via cfe-commits
werat updated this revision to Diff 362677. werat added a comment. Use `io.open` explicitly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106792/new/ https://reviews.llvm.org/D106792 Files: clang-tools-extra/clang-tidy/add_new_check.py clang-

[PATCH] D107025: Take OptimizationLevel class out of Pass Builder

2021-07-29 Thread Tarindu Jayatilaka via Phabricator via cfe-commits
tarinduj updated this revision to Diff 362675. tarinduj added a comment. added namespace and header guards Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107025/new/ https://reviews.llvm.org/D107025 Files: clang/lib/CodeGen/BackendUtil.cpp llvm

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Andy Yankovsky via Phabricator via cfe-commits
werat updated this revision to Diff 362678. werat added a comment. Fix incorrect replace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106792/new/ https://reviews.llvm.org/D106792 Files: clang-tools-extra/clang-tidy/add_new_check.py clang-tool

[PATCH] D91950: [clang-format] Add BreakBeforeInlineASMColon configuration

2021-07-29 Thread Anastasiia Lukianenko via Phabricator via cfe-commits
anastasiia_lukianenko updated this revision to Diff 362680. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91950/new/ https://reviews.llvm.org/D91950 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/Format/ContinuationIndenter.cpp clang/l

[PATCH] D107047: [clangd] Fix the crash in getQualification

2021-07-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Happens when DestContext is Link

[PATCH] D107047: [clangd] Fix the crash in getQualification

2021-07-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 362687. kbobyrev added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107047/new/ https://reviews.llvm.org/D107047 Files: clang-tools-extra/clangd/AST.cpp Index: clang-tools-extra

[PATCH] D107049: [clang-repl] Re-implement clang-interpreter as a test case.

2021-07-29 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added reviewers: rsmith, teemperor, lhames, bkramer. Herald added subscribers: mstorsjo, mgorny. v.g.vassilev requested review of this revision. The current infrastructure in lib/Interpreter has a tool, clang-repl, very similar to clang-interpreter

[PATCH] D107025: Take OptimizationLevel class out of Pass Builder

2021-07-29 Thread Tarindu Jayatilaka via Phabricator via cfe-commits
tarinduj updated this revision to Diff 362692. tarinduj added a comment. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107025/new/ https://reviews.llvm.org/D107025 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/examples/Bye/Bye.cpp llvm/include/llvm/Passes/Optimizatio

[clang-tools-extra] d8fd214 - NFC: Change quotes from Unicode to ASCII

2021-07-29 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2021-07-29T11:37:10+02:00 New Revision: d8fd2146daaa28d118fd7c29d63e817a8c955b81 URL: https://github.com/llvm/llvm-project/commit/d8fd2146daaa28d118fd7c29d63e817a8c955b81 DIFF: https://github.com/llvm/llvm-project/commit/d8fd2146daaa28d118fd7c29d63e817a8c955b81.diff

[PATCH] D106773: [clang-format] Fix aligning with linebreaks #2

2021-07-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D106773#2912732 , @curdeius wrote: > This bug fix should probably be cherry-picked into 13.x branch. WDYT? Yeah, I wrote already an email about it. Or can (and should) I push it myself? Repository: rG LLVM Githu

[PATCH] D107051: [clang][analyzer] Improve bug report in alpha.security.ReturnPtrRange

2021-07-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a reviewer: Szelethus. balazske requested review of this revisio

[PATCH] D91950: [clang-format] Add BreakBeforeInlineASMColon configuration

2021-07-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. And format what clang-format says. Then it looks good to me. Comment at: clang/unittests/Format/FormatTest.cpp:6250 + verifyFormat("asm volatile(\"lng\",\n" + " : : val);", + Style)

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Makes sense, thank you for the explanation. I've changed the problematic doc but this is probably still fine. Honestly, I don't really think we should have more Unicode symbols in the docs for generators hence this patch might not be needed but I'd be OK if you really

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Andy Yankovsky via Phabricator via cfe-commits
werat added a comment. In D106792#2912955 , @kbobyrev wrote: > Honestly, I don't really think we should have more Unicode symbols in the > docs for generators I'm not very familiar with the documentation build process, but maybe we could enforce only-A

[PATCH] D107049: [clang-repl] Re-implement clang-interpreter as a test case.

2021-07-29 Thread Lang Hames via Phabricator via cfe-commits
lhames added a comment. LGTM, but a clang dev should probably check this out too. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107049/new/ https://reviews.llvm.org/D107049 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D107004: Turn off fp reassociation in IA intrinsic header files.

2021-07-29 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon requested changes to this revision. RKSimon added a comment. This revision now requires changes to proceed. I really don't support this change - -ffast-math should be allowed to perform aggressive folds and it makes no sense to make an exception for common intrinsics like these. We shou

[PATCH] D107047: [clangd] Fix the crash in getQualification

2021-07-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks for chasing this down! as mentioned offline a test case like: namespace ns { extern "C" { typedef int foo; } foo Fo^o(int id) { return id; } } in define outline should be enough to ensure it is WAI. Comment at: clang-tools-extra/cl

[PATCH] D107051: [clang][analyzer] Improve bug report in alpha.security.ReturnPtrRange

2021-07-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Aside from that `Returned pointer value points outside the original object with size of 10 'int' objects` reads somewhat unnatural I have no objections. A couple of nits here and there but overall I'm pleased to see more verbose bug reports. Comment

[PATCH] D106773: [clang-format] Fix aligning with linebreaks #2

2021-07-29 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a subscriber: tstellar. curdeius added a comment. In D106773#2912925 , @HazardyKnusperkeks wrote: > In D106773#2912732 , @curdeius > wrote: > >> This bug fix should probably be cherry-picked into

[PATCH] D98709: [clang-tidy] New feature --skip-headers, part 1, LocFilter

2021-07-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 362702. chh added a comment. sync to the latest source; apply clang-format; add new skip-headers-4.cpp test; skip modernize-use-nullptr warnings in header files in UseNullptrCheck.cpp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98709/new/ https://revi

[PATCH] D98710: [clang-tidy] New feature --skip-headers, part 1, setTraversalScope

2021-07-29 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 362704. chh added a comment. sync to the latest source; apply clang-format; add new skip-headers-4.cpp test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98710/new/ https://reviews.llvm.org/D98710 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp c

[PATCH] D107047: [clangd] Fix the crash in getQualification

2021-07-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 362707. kbobyrev added a comment. Make the controol flow less confusing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107047/new/ https://reviews.llvm.org/D107047 Files: clang-tools-extra/clangd/AST.cpp

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-07-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 362470. gandhi21299 added a comment. - added an OpenCL test to check for unsafe HW instructions - CUDA forces CAS loop over using unsafe HW instructions even with `-munsafe-fp-atomics`, eliminated that test Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-07-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 362487. gandhi21299 added a comment. - added scope argument - removed irrelevant tests and updated them - replaced __constant by __generic qualifier for two of the test functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D106899: [LLVM][NFC] Remove LLVM_ATTRIBUTE_NORETURN and use [[noreturn]] directly

2021-07-29 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit updated this revision to Diff 362492. gAlfonso-bit added a comment. Fix clang format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106899/new/ https://reviews.llvm.org/D106899 Files: clang-tools-extra/pp-trace/PPTrace.cpp clang/utils/TableGen/ClangDiagnosticsEmitter.cp

[PATCH] D106899: [LLVM][NFC] Remove LLVM_ATTRIBUTE_NORETURN and use [[noreturn]] directly

2021-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Drop llvm/include/llvm/Support/Compiler.h change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106899/new/ https://reviews.llvm.org/D106899 ___

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-07-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 362518. gandhi21299 added a comment. - code format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 Files: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu clan

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-07-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 362522. gandhi21299 added a comment. Herald added subscribers: llvm-commits, foad, hiraditya. Herald added a project: LLVM. - removed `kernel` from functions taking in `__generic` qualified `addr` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D106899: [LLVM][NFC] Replace LLVM_ATTRIBUTE_NORETURN with [[noreturn]]

2021-07-29 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit updated this revision to Diff 362533. gAlfonso-bit retitled this revision from "[LLVM][NFC] Remove LLVM_ATTRIBUTE_NORETURN and use [[noreturn]] directly" to "[LLVM][NFC] Replace LLVM_ATTRIBUTE_NORETURN with [[noreturn]]". gAlfonso-bit added a comment. Removed Compiler.h changes CH

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-07-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 362555. gandhi21299 added a comment. - eliminated scope argument, seemed irrelevant Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106909/new/ https://reviews.llvm.org/D106909 Files: clang/include/clang/B

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. release/13.x has been created. This if merged will go into 14.x. We have plenty of time making more format changes if needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/ https://reviews.llvm.org/D104556

[PATCH] D106778: [OpenCL] opencl-c.h: add CL 3.0 non-generic address space atomics

2021-07-29 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106778/new/ https://reviews.llvm.org/D106778 _

[PATCH] D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream .

2021-07-29 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. I like the generalization still, but I don't agree with how you retrieve the `NoteTag` message. Its the wrong way around. This is how you invoke your function: void StreamCh

[PATCH] D107054: [Clang][CUDA] Add descriptors, mappings, and features for missing CUDA and PTX versions

2021-07-29 Thread Steffen Larsen via Phabricator via cfe-commits
steffenlarsen created this revision. steffenlarsen added a reviewer: tra. Herald added subscribers: dexonsmith, hiraditya, yaxunl, jholewinski. steffenlarsen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Adds missing des

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D106431#2912589 , @Sockke wrote: > Thank you for your reply! I generally understand what you mean, but there are > three cases, namely, no diagnosis, providing diagnosis, and providing > diagnosis & FixIt. Only by judg

[clang-tools-extra] 68546c9 - bugprone-forwarding-reference-overload: support non-type template parameters

2021-07-29 Thread Aaron Ballman via cfe-commits
Author: Jesse Towner Date: 2021-07-29T07:01:19-04:00 New Revision: 68546c9d6fc54a7ca7ad487cd4b6a5dafea9b4f3 URL: https://github.com/llvm/llvm-project/commit/68546c9d6fc54a7ca7ad487cd4b6a5dafea9b4f3 DIFF: https://github.com/llvm/llvm-project/commit/68546c9d6fc54a7ca7ad487cd4b6a5dafea9b4f3.diff

[PATCH] D103385: [clang-tidy] bugprone-forwarding-reference-overload: support non-type template parameters

2021-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've committed on your behalf in 68546c9d6fc54a7ca7ad487cd4b6a5dafea9b4f3 , thank you for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D107026: [Clang] Add support for attribute 'escape'

2021-07-29 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Great job! It looks good, but I have a couple of minor tweaks. I see that the "applies to pointer arguments only" warning is not tested for `noescape`, but I still find it to be a good practice to write a test with a bunch of cases with attributes applied in wrong p

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D106732#2911552 , @beanz wrote: > Covered taken #elif* directives per @aaron.ballmon's feedback. Thanks! > Handling non-taken #elif directives is non-trivial because clang skips > parsing the conditionals for non-taken

[PATCH] D105821: [analyzer] [WIP] Model destructor for std::unique_ptr

2021-07-29 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:143 +llvm::ArrayRef ValidNames(STD_PTR_NAMES); +return llvm::is_contained(ValidNames, Name); } And why can't we pass `STD_PTR_NAMES` directly to `llvm:

[PATCH] D106277: [SVE] Remove the interface for getMaxVScale in favour of the IR attributes

2021-07-29 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added a comment. @craig.topper can you share RISCV plans around supporting vscale_range? In essence we'd like to deprecate the TTI method and have LLVM IR contain all relevant information when is comes to interpreting vscale. Currently the usage is minimal and so checking both i

[PATCH] D104601: [Preprocessor] Implement -fminimize-whitespace.

2021-07-29 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. Hi @Meinersbur, It seems the patch introduces one more regression. The following test doesn't pass on Windows: // RUN: %clang -E %s -o %t.ii // RUN: %clang %t.ii #include "string.h" int main() { return 0; } The following macro from vcruntime.h:

[PATCH] D106898: Revert "Revert "[clang][pp] adds '#pragma include_instead'""

2021-07-29 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 with the testing and formatting fix. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:307 +def err_pragma_include_instead_system_reserved : Erro

[PATCH] D105981: [AMDGPU][OpenMP] Support linking of math libraries

2021-07-29 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal updated this revision to Diff 362717. pdhaliwal added a comment. Rename method to getCommonDeviceLibNames Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105981/new/ https://reviews.llvm.org/D105981 Files: clang/lib/Driver/ToolChains/AMD

[PATCH] D105981: [AMDGPU][OpenMP] Support linking of math libraries

2021-07-29 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal updated this revision to Diff 362718. pdhaliwal added a comment. Missed comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105981/new/ https://reviews.llvm.org/D105981 Files: clang/lib/Driver/ToolChains/AMDGPU.cpp clang/lib/Drive

[PATCH] D106614: [Clang] add btf_tag attribute

2021-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D106614#2912292 , @yonghong-song wrote: >> This currently has no codegen, so it only adds the attribute to the AST and >> does nothing with it. Can you also add the codegen components to this patch? > > In one of my ear

[PATCH] D106614: [Clang] add btf_tag attribute

2021-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1835 + let Args = [StringArgument<"BTFTag">]; + let Subjects = SubjectList<[Var, Function, Record, Field], ErrorDiag>; + let Documentation = [BTFTagDocs]; yonghong-song wrote: >

[PATCH] D102343: [clang][patch][FPEnv} Initialization of C++ globals not strictfp aware

2021-07-29 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. Giving my official LGTM now that there's been a week for folks to comment with additional concerns. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D105821: [analyzer] [WIP] Model destructor for std::unique_ptr

2021-07-29 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:421-422 const auto *TrackingExpr = Call.getArgExpr(0); - assert(TrackingExpr->getType()->isPointerType() && - "Adding a non pointer value to TrackedRegionMap

[PATCH] D106644: [clang][analyzer] Add standard streams to alpha.unix.Stream checker.

2021-07-29 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: vsavchenko. Szelethus added a comment. I like the idea, though I wonder whether `evalAssume` would be a better callback for this. That way, you'd only need to add an assumption when you reach a condition where one of the operands is standard. Though it may be more tr

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-29 Thread Lei Huang via Phabricator via cfe-commits
lei updated this revision to Diff 362734. lei added a comment. put back unintentional space change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107002/new/ https://reviews.llvm.org/D107002 Files: clang/include/clang/Basic/BuiltinsPPC.def clan

[PATCH] D105821: [analyzer] [WIP] Model destructor for std::unique_ptr

2021-07-29 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:143 +llvm::ArrayRef ValidNames(STD_PTR_NAMES); +return llvm::is_contained(ValidNames, Name); } vsavchenko wrote: > And why can't we pass `STD_PTR_NAMES`

[PATCH] D105821: [analyzer] [WIP] Model destructor for std::unique_ptr

2021-07-29 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 362738. RedDocMD added a comment. Bug fixes, some cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105821/new/ https://reviews.llvm.org/D105821 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling

[PATCH] D105821: [analyzer] [WIP] Model destructor for std::unique_ptr

2021-07-29 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:381 +const MemRegion *ThisRegion = DC->getCXXThisVal().getAsRegion(); +assert(ThisRegion && "We do not support explicit calls to destructor"); +const auto *InnerPtrVal

[PATCH] D105821: [analyzer] [WIP] Model destructor for std::unique_ptr

2021-07-29 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:381 +const MemRegion *ThisRegion = DC->getCXXThisVal().getAsRegion(); +assert(ThisRegion && "We do not support explicit calls to destructor"); +const auto *InnerPtrVal =

[PATCH] D105821: [analyzer] [WIP] Model destructor for std::unique_ptr

2021-07-29 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 362741. RedDocMD added a comment. Put in a TODO Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105821/new/ https://reviews.llvm.org/D105821 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp cla

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added reviewers: hubert.reinterpretcast, ZarkoCA, stevewan. jamieschmeiser requested review of this revision. Herald added a project: clang. Set the TargetCPUName for AIX to default to pwr7, removing the setting of it based on the major/minor of

[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

2021-07-29 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added inline comments. Comment at: llvm/lib/Target/PowerPC/P9InstrResources.td:1434 + ADDEX, + ADDEX8 )> { let Unsupported = 1; } You have added the 64-bit version of this, but it seems this is only available for 64-bit operands in 64-bit mode. Under

[PATCH] D107051: [clang][analyzer] Improve bug report in alpha.security.ReturnPtrRange

2021-07-29 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added reviewers: steakhal, NoQ, martong, vsavchenko. Szelethus added a comment. Herald added a subscriber: rnkovacs. One of the test files needs fixing: https://reviews.llvm.org/harbormaster/unit/view/931615/ Love the patch, though I agree that the note message needs some improvement.

[PATCH] D101960: [openmp] Drop requirement on library path environment variables

2021-07-29 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. Just ran into this again. It's really annoying that a test fails, and prints a run line, which can be copied into a terminal where it abjectly fails to run because the environment variables aren't set. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM with comment. Comment at: clang/test/Driver/aix-mcpu-default.c:9 -// Check that the target cpu defaults to power4 on AIX7.1 and below.

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA added a comment. Thanks @jamieschmeiser this change LGTM but I'll defer to @hubert.reinterpretcast for final approval. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107063/new/ https://reviews.llvm.org/D107063

[PATCH] D106854: Pass `--start-group` and `--end-group` to the linker when using the AVR toolchain

2021-07-29 Thread Ben Shi via Phabricator via cfe-commits
benshi001 accepted this revision. benshi001 added a comment. This revision is now accepted and ready to land. Do you need I land your patch for you? What name and email do you expected to see in the commit message ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D106854: Pass `--start-group` and `--end-group` to the linker when using the AVR toolchain

2021-07-29 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. Do you mind if I change the title to "Pass --start-group and --end-group to avr-ld in clang driver" ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106854/new/ https://reviews.llvm.org/D106854 __

[PATCH] D106899: [LLVM][NFC] Replace LLVM_ATTRIBUTE_NORETURN with [[noreturn]]

2021-07-29 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit added a comment. I don't know why this is failing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106899/new/ https://reviews.llvm.org/D106899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 362760. jamieschmeiser added a comment. Respond to review comment: expand testing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107063/new/ https://reviews.llvm.org/D107063 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/test/D

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Jamie Schmeiser 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 rGc3c1826c310c: Set TargetCPUName for AIX to default to pwr7. (authored by jamieschmeiser). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] c3c1826 - Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Jamie Schmeiser via cfe-commits
Author: Jamie Schmeiser Date: 2021-07-29T09:59:24-04:00 New Revision: c3c1826c310c42244c7cad8d0c6af3a368fcd064 URL: https://github.com/llvm/llvm-project/commit/c3c1826c310c42244c7cad8d0c6af3a368fcd064 DIFF: https://github.com/llvm/llvm-project/commit/c3c1826c310c42244c7cad8d0c6af3a368fcd064.dif

[PATCH] D107073: [analyzer] Disable direct binding from list initialization for constant arrays of local storage duration.

2021-07-29 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: NoQ, vsavchenko, steakhal, xazax.hun. ASDenysPetrov added a project: clang. Herald added subscribers: manas, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. ASDenysPetrov r

[PATCH] D92928: [analyzer] Highlight arrows for currently selected event

2021-07-29 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov accepted this revision. ASDenysPetrov added a comment. This revision is now accepted and ready to land. Let's load this patch and I will prepare the adjustment for IE in pursuit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92928/new/

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362764. beanz marked 3 inline comments as done. beanz added a comment. Addressing @aaron.ballman's feedback. I've added FIXMEs and test cases with not-expected annotations so that in the future if the underlying issue gets fixed, the tests should only need upd

[PATCH] D106277: [SVE] Remove the interface for getMaxVScale in favour of the IR attributes

2021-07-29 Thread Fraser Cormack via Phabricator via cfe-commits
frasercrmck added a comment. In D106277#2913136 , @paulwalker-arm wrote: > @craig.topper can you share RISCV plans around supporting vscale_range? In > essence we'd like to deprecate the TTI method and have LLVM IR contain all > relevant information w

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-07-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: llvm/test/CodeGen/X86/x86-fpclass.ll:173 + +define <1 x i1> @isnan_double_vec1(<1 x double> %x) { +; CHECK-32-LABEL: isnan_double_vec1: RKSimon wrote: > add nounwind to reduce cfi noise (other tests would benefit as we

[PATCH] D107077: [PowerPC] Fix return type of XL compat CAS

2021-07-29 Thread Kai Luo via Phabricator via cfe-commits
lkail created this revision. lkail added reviewers: jsji, PowerPC. Herald added subscribers: shchenz, kbarton, nemanjai. lkail requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `__compare_and_swap*` should return `i32` rather than `i1`. Rep

[PATCH] D107077: [PowerPC] Fix return type of XL compat CAS

2021-07-29 Thread Jinsong Ji via Phabricator via cfe-commits
jsji accepted this revision as: jsji. jsji added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107077/new/ https://reviews.llvm.org/D107077 _

[PATCH] D107078: [analyzer] Catch leaking stack addresses via stack variables

2021-07-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, vsavchenko, martong, Szelethus. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity. steakhal requested review of this revision. H

[PATCH] D89380: [clang-tidy] Fix for cppcoreguidelines-prefer-member-initializer to handle classes declared in macros

2021-07-29 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @baloghadamsoftware Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89380/new/ https://reviews.llvm.org/D89380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D105904: [clangd] Support `#pragma mark` in the outline

2021-07-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CollectMacros.cpp:13 +namespace { +class CollectPragmaMarks : public clang::PPCallbacks { can you nest this inside `clang::clangd` and drop the qualifiers ? Comment at: clan

[PATCH] D106644: [clang][analyzer] Add standard streams to alpha.unix.Stream checker.

2021-07-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 362775. balazske added a comment. Herald added a subscriber: mgorny. Split some type lookup functions from StdLibraryFunctionsChecker into separate files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106644/n

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-07-29 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: llvm/test/Transforms/InstCombine/fpclass.ll:29 + ret <2 x i1> %t +} + You probably need some negative tests (no flags, ninf instead of nnan etc.)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D105904: [clangd] Support `#pragma mark` in the outline

2021-07-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:535 +/// by range. +std::vector mergePragmas(std::vector &Syms, + std::vector &Pragmas, dgoldman wrote: > kadircet wrote: > > dgoldman wr

[clang] e4902e6 - [PowerPC] Fix return type of XL compat CAS

2021-07-29 Thread Kai Luo via cfe-commits
Author: Kai Luo Date: 2021-07-29T14:49:26Z New Revision: e4902e69e99d07d6d311425d87d4c1d075b72bf8 URL: https://github.com/llvm/llvm-project/commit/e4902e69e99d07d6d311425d87d4c1d075b72bf8 DIFF: https://github.com/llvm/llvm-project/commit/e4902e69e99d07d6d311425d87d4c1d075b72bf8.diff LOG: [Powe

[PATCH] D107077: [PowerPC] Fix return type of XL compat CAS

2021-07-29 Thread Kai Luo 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 rGe4902e69e99d: [PowerPC] Fix return type of XL compat CAS (authored by lkail). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D104285: [analyzer] Retrieve value by direct index from list initialization of constant array declaration.

2021-07-29 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. I like the idea and I think this is a valuable patch. However, because of the changes under `lib/AST` we need to add other reviewers who are responsible for those parts (e.g. aaronballman or rsmith). Is there really no way to workaround those changes? E.g. could we have

[PATCH] D89380: [clang-tidy] Fix for cppcoreguidelines-prefer-member-initializer to handle classes declared in macros

2021-07-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D89380#2913664 , @martong wrote: > @baloghadamsoftware Ping. Bug 47778 is marked //FIXED// by D97132 . CHANGES SINCE LAST ACTION https://revi

[PATCH] D107025: Take OptimizationLevel class out of Pass Builder

2021-07-29 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin accepted this revision. mtrofin added inline comments. This revision is now accepted and ready to land. Comment at: llvm/include/llvm/Passes/OptimizationLevel.h:128 +#endif \ No newline at end of file add a newline here (it helps diff tools) CHANGES SI

[PATCH] D106899: [LLVM][NFC] Replace LLVM_ATTRIBUTE_NORETURN with [[noreturn]]

2021-07-29 Thread Alf via Phabricator via cfe-commits
gAlfonso-bit updated this revision to Diff 362780. gAlfonso-bit added a comment. Had to fix a clang-tidy issue for this to even compile CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106899/new/ https://reviews.llvm.org/D106899 Files: clang-tools-extra/pp-trace/PPTrace.cpp clang/uti

[PATCH] D106644: [clang][analyzer] Add standard streams to alpha.unix.Stream checker.

2021-07-29 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D106644#2913676 , @balazske wrote: > Split some type lookup functions from StdLibraryFunctionsChecker into > separate files. Thank you, this is awesome! Comment at: clang/lib/StaticAnalyzer/Checkers/Stream

[PATCH] D89380: [clang-tidy] Fix for cppcoreguidelines-prefer-member-initializer to handle classes declared in macros

2021-07-29 Thread Gabor Marton via Phabricator via cfe-commits
martong commandeered this revision. martong added a reviewer: baloghadamsoftware. martong added a comment. In D89380#2913750 , @whisperity wrote: > In D89380#2913664 , @martong wrote: > >> @baloghadamsoftware Ping.

[PATCH] D106864: [clang][cli] Expose -fno-cxx-modules in cc1

2021-07-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/test/Modules/cxx20-disable.cpp:2 +// RUN: rm -rf %t && mkdir %t +// RUN: not %clang_cc1 -x objective-c++ -std=c++20 -fno-cxx-modules -I %t %s + jansvoboda11 wrote: > I'm not sure how to best test this. Checking th

[PATCH] D106862: [clang][modules] Avoid creating partial FullSourceLoc for explicit modules imports

2021-07-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. I think this approach makes sense for now. It's unfortunate that the constructor of FullSourceLoc is unable to validate this requirement, do you know how many clients that you describe as

  1   2   3   >