[clang] 39f50da - Support -fstack-clash-protection for x86

2020-02-07 Thread via cfe-commits
Author: serge_sans_paille Date: 2020-02-07T10:56:15+01:00 New Revision: 39f50da2a357a8f685b3540246c5d762734e035f URL: https://github.com/llvm/llvm-project/commit/39f50da2a357a8f685b3540246c5d762734e035f DIFF:

[PATCH] D73897: [analyzer] StdLibraryFunctionsChecker refactor: remove macros

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. This is amazing. LGTM, granted that @NoQ is happy with the patch as well. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:33 // // This

[PATCH] D74214: [clang-tidy] Fix PR#34798 'readability-braces-around-statements breaks statements containing braces.'

2020-02-07 Thread Karasev Nikita via Phabricator via cfe-commits
f00kat created this revision. f00kat added reviewers: aaron.ballman, alexfh. f00kat added projects: clang, clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. In method 'BracesAroundStatementsCheck::checkStmt' the call 'Lexer::makeFileCharRange(line 253)' return different

[PATCH] D73350: [analyzer] Small StreamChecker refactoring (NFC).

2020-02-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 243092. balazske added a comment. Reformat. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73350/new/ https://reviews.llvm.org/D73350 Files: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp Index:

[PATCH] D73696: [clang][Index] Introduce a TemplateParm SymbolKind

2020-02-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/Protocol.cpp:265 case index::SymbolKind::Parameter: + case index::SymbolKind::TemplateParm: return SymbolKind::Variable; sammccall wrote: >

[PATCH] D71433: [analyzer] CERT: POS34-C

2020-02-07 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D71433#1808316 , @Charusso wrote: > In D71433#1784238 , @NoQ wrote: > > > Currently the check may warn on non-bugs of the following kind: > > > > void foo() { > > char env[] =

[PATCH] D74131: [analyzer][taint] Add isTainted debug expression inspection check

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. After tests are added and `clang-format-diff.py` is ran, this would be an amazing patch, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74131/new/ https://reviews.llvm.org/D74131

[PATCH] D67399: [ARM] Follow AACPS for preserving number of loads/stores of volatile bit-fields

2020-02-07 Thread Diogo N. Sampaio via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d869180c4ad: [ARM] Follow AACPS for preserving number of loads/stores of volatile bit-fields (authored by dnsampaio). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

2020-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D74116#1863186 , @rjmccall wrote: > Hmm. The alternative approach, I suppose, would be to recognize that we're > about to emit a generic error and just recheck assignment constraints to > recompute the AssignConvertType.

[PATCH] D71433: [analyzer] CERT: POS34-C

2020-02-07 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze added a comment. In D71433#1863638 , @Charusso wrote: > In D71433#1808316 , @Charusso wrote: > > > In D71433#1784238 , @NoQ wrote: > > > > > Currently the check

[PATCH] D73536: [analyzer][taint] Remove taint from symbolic expressions if used in comparisons

2020-02-07 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I genuinely think that in the following case we should warn, since the user already had a chance to express the range assumption using an `assert`. I think that regardless which checker in what condition checks for a given constraint. If the expression is tainted, we

[PATCH] D74146: [SytemZ] Disable vector ABI when using option -march=arch[8|9|10]

2020-02-07 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74146/new/ https://reviews.llvm.org/D74146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D72705#1861750 , @balazske wrote: > Uploading new diff with added comments and renaming. Great, very much appreciated! It took a loong time, but I think I got whats going on. So, step by step, this is what we're going if a

[clang] 6064f42 - [OpenCL] Restrict addr space conversions in nested pointers

2020-02-07 Thread Anastasia Stulova via cfe-commits
Author: Anastasia Stulova Date: 2020-02-07T12:04:35Z New Revision: 6064f426a18304e16b51cc79e74c9c2d55ef5a9c URL: https://github.com/llvm/llvm-project/commit/6064f426a18304e16b51cc79e74c9c2d55ef5a9c DIFF: https://github.com/llvm/llvm-project/commit/6064f426a18304e16b51cc79e74c9c2d55ef5a9c.diff

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:731 + } + return C.getNoteTag([Text, Name](BugReport ) -> std::string { + SmallString<256> Msg; baloghadamsoftware wrote: > NoQ wrote: > > Szelethus

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-02-07 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 wouldn't like to see reports emitted by a checker that resides in `apiModeling`. Could we create a new one? Some checkers, like the `IteratorChecker`, `MallocChecker` and

[PATCH] D67399: [ARM] Follow AACPS for preserving number of loads/stores of volatile bit-fields

2020-02-07 Thread Diogo N. Sampaio via Phabricator via cfe-commits
dnsampaio updated this revision to Diff 243102. dnsampaio added a comment. Revordered some tests adding and definition of the "isAAPCS" function from patch D72932 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] f6d9842 - Revert "Support -fstack-clash-protection for x86"

2020-02-07 Thread via cfe-commits
Author: serge-sans-paille Date: 2020-02-07T11:36:53+01:00 New Revision: f6d98429fcdba97988fa1e3ec10dc2ca943dd0da URL: https://github.com/llvm/llvm-project/commit/f6d98429fcdba97988fa1e3ec10dc2ca943dd0da DIFF:

[PATCH] D73360: [OpenCL] Restrict address space conversions in nested pointers

2020-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6064f426a183: [OpenCL] Restrict addr space conversions in nested pointers (authored by Anastasia). Herald added a project: clang. Changed prior to commit:

[PATCH] D73897: [analyzer] StdLibraryFunctionsChecker refactor: remove macros

2020-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:537-551 + // The format is as follows: //{ "function name", - // { spec: + // { variant0: //{ argument types

[PATCH] D73891: [RISCV] Support experimental/unratified extensions

2020-02-07 Thread Simon Cook via Phabricator via cfe-commits
simoncook planned changes to this revision. simoncook added a comment. With the update to D69987 adding the `Zvqmac` predicate, it seems both the `b` and `v` extensions have Z extensions that also need supporting using this method, I'll update this to also

[PATCH] D73897: [analyzer] StdLibraryFunctionsChecker refactor: remove macros

2020-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 243117. martong marked an inline comment as done. martong added a comment. - Rename several types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73897/new/ https://reviews.llvm.org/D73897 Files:

[PATCH] D71433: [analyzer] CERT: POS34-C

2020-02-07 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze updated this revision to Diff 243127. zukatsinadze added a comment. Addressed new inline comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71433/new/ https://reviews.llvm.org/D71433 Files: clang/docs/analyzer/checkers.rst

[PATCH] D74168: [CMake] Make EXCLUDE_FROM_ALL an argument to add_lit_testsuite

2020-02-07 Thread Konstantin Schwarz via Phabricator via cfe-commits
kschwarz added inline comments. Comment at: llvm/test/CMakeLists.txt:171 +if(LLVM_BUILD_TOOLS) + set(exclude_from_check_all "EXCLUDE_FROM_CHECK_ALL") Hi @JDevlieghere, we've noticed that with this patch check-llvm isn't added to check-all anymore by default.

[clang] 64bc627 - clang-cl: Parse new MSVC flags /Qspectre-load and /Qspectre-load-cf

2020-02-07 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2020-02-07T13:00:52+01:00 New Revision: 64bc627b8878dd77fc3a85007e2ced0a515c77d3 URL: https://github.com/llvm/llvm-project/commit/64bc627b8878dd77fc3a85007e2ced0a515c77d3 DIFF: https://github.com/llvm/llvm-project/commit/64bc627b8878dd77fc3a85007e2ced0a515c77d3.diff

[PATCH] D73696: [clang][Index] Introduce a TemplateParm SymbolKind

2020-02-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 243091. kadircet marked 2 inline comments as done. kadircet added a comment. - As discussed offline, do not expose new symbol kinds to libclang - Set types for templateparms in HoverInfo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74117: [AArch64][SVE] SVE2 intrinsics for character match & histogram generation

2020-02-07 Thread Cullen Rhodes via Phabricator via cfe-commits
c-rhodes accepted this revision. c-rhodes 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/D74117/new/ https://reviews.llvm.org/D74117

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-02-07 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG39f50da2a357: Support -fstack-clash-protection for x86 (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D68720?vs=240844=243101#toc Repository: rG LLVM Github

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-02-07 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. This seems to be breaking the buildbots, e.g. http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/33475/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Astack-clash-protection.c

[PATCH] D73350: [analyzer] Small StreamChecker refactoring (NFC).

2020-02-07 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc4f0f8ec41fd: [analyzer] Small StreamChecker refactoring (NFC). (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73350/new/

[clang] 74734e8 - Fix docs and comments for max_tokens_total pragma

2020-02-07 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2020-02-07T11:37:14+01:00 New Revision: 74734e809ac778beb01776ee207643184c09c2a0 URL: https://github.com/llvm/llvm-project/commit/74734e809ac778beb01776ee207643184c09c2a0 DIFF: https://github.com/llvm/llvm-project/commit/74734e809ac778beb01776ee207643184c09c2a0.diff

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-02-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. If more discussion is needed it is better to use "Discourse" instead of this review? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72705/new/ https://reviews.llvm.org/D72705

[PATCH] D72035: [analyzer][NFC] Use CallEvent checker callback in GenericTaintChecker

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Hmm, have you branched off of D71524 ? If so, this patch should definitely land first. Comment at: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:165 /// Given a pointer argument, return the value it

[PATCH] D71524: [analyzer] Support tainted objects in GenericTaintChecker

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. A portion of my concerns are answered by this patch: D72035 . Comment at: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:103-132 struct FunctionData { FunctionData() = delete;

[PATCH] D74216: [clang-rename] Fix the missing template constructors.

2020-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kbobyrev. Herald added subscribers: usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. When renaming a class with template constructors, we are missing the occurrences of the template constructors, because

[PATCH] D74131: [analyzer][taint] Add isTainted debug expression inspection check

2020-02-07 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 243146. steakhal added a comment. Clarified example usage, especially in contrast of eg.: `debug.TaintTest` checker. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74131/new/ https://reviews.llvm.org/D74131

[PATCH] D71433: [analyzer] CERT: POS34-C

2020-02-07 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze updated this revision to Diff 243149. zukatsinadze marked an inline comment as done. zukatsinadze added a comment. - Removed dead code. - Removed unnecessary if condition. - Changed error phrasing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71433/new/

[PATCH] D71433: [analyzer] CERT: POS34-C

2020-02-07 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze marked 2 inline comments as done. zukatsinadze added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:3383-3386 +std::unique_ptr getMallocBRVisitor(SymbolRef Sym) { + return std::make_unique(Sym); +} + Szelethus

Re: patch via mailing list: Use getLocation() in too few/many arguments diagnostic

2020-02-07 Thread John Marshall via cfe-commits
Ping. I am a newcomer to Clang so don't know who might be appropriate reviewers to CC, so I've CCed a couple of general people from clang/CODE_OWNERS.TXT who may be able to forward as appropriate. Thanks, John On 20 Jan 2020, at 16:09, John Marshall wrote: > > This small patch improves

[PATCH] D73536: [analyzer][taint] Remove taint from symbolic expressions if used in comparisons

2020-02-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. You cannot always have constant bounds. E.g. a dynamically allocated array size might depend on a variable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73536/new/ https://reviews.llvm.org/D73536

[PATCH] D74076: [Clang][Driver] Remove -M group options before generating crash diagnostics

2020-02-07 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Relanded as rG75f09b54429bee17a96e2ba7a2ac0f0a8a7f7e74 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74076/new/ https://reviews.llvm.org/D74076

[PATCH] D74070: [Clang] Don't let gen crash diagnostics fail when '#pragma clang __debug crash' is used

2020-02-07 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Relanded as rG75f09b54429bee17a96e2ba7a2ac0f0a8a7f7e74 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74070/new/ https://reviews.llvm.org/D74070

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-02-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I've filed this bug against this patch: https://bugs.llvm.org/show_bug.cgi?id=44823 We've discovered in cases where multiple TUs are invoked in a single command line that the memory between calls isn't cleaned up like it was previously. This results in really high

[PATCH] D73644: [Mips] Add intrinsics for 4-byte and 8-byte MSA loads/stores.

2020-02-07 Thread Mirko Brkusanin via Phabricator via cfe-commits
mbrkusanin updated this revision to Diff 243153. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73644/new/ https://reviews.llvm.org/D73644 Files: clang/include/clang/Basic/BuiltinsMips.def clang/lib/Headers/msa.h clang/lib/Sema/SemaChecking.cpp

[PATCH] D73644: [Mips] Add intrinsics for 4-byte and 8-byte MSA loads/stores.

2020-02-07 Thread Mirko Brkusanin via Phabricator via cfe-commits
mbrkusanin added a comment. Rebase. Not yet, a proposal was made to both GCC and LLVM and as far as I can tell no work was done on that yet. If we accept these names I'll let them know so we end up with matching names. As for 4/8 byte loads, in case of having them implemented as **ld** plus

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. Anything else @efriedma ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73543/new/ https://reviews.llvm.org/D73543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D73644: [Mips] Add intrinsics for 4-byte and 8-byte MSA loads/stores.

2020-02-07 Thread Mirko Brkusanin via Phabricator via cfe-commits
mbrkusanin added a comment. Not yet, a proposal was made to both GCC and LLVM and as far as I can tell no work was done on GCC yet. If we accept these names I'll let them know so we end up with matching names. As for 4/8 byte loads, in case of having them implemented as **ld** plus some extra

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D73898#1864066 , @martong wrote: > In D73898#1863710 , @Szelethus wrote: > > > I wouldn't like to see reports emitted by a checker that resides in > > `apiModeling`. Could we create a

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > What I mean by that is that we must do over-approximation if the argument is > symbolic. I.e. we presume that the constraints do hold otherwise the program > would be ill-formed and there is no point to continue the analysis on this > path. Sorry, that's actually

[PATCH] D71433: [analyzer] CERT: POS34-C

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This is a very neat checker, the source code reads so easily, we might as well put it as the official CERT rule description. I think adding the non-compliant and compliant code examples would be nice. I also wrote some inline

[PATCH] D74131: [analyzer][taint] Add isTainted debug expression inspection check

2020-02-07 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 243144. steakhal added a comment. - Tests added. - Clang-format-diff applied. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74131/new/ https://reviews.llvm.org/D74131 Files:

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Driver/Options.td:3414-3416 +def fsycl : Flag<["-"], "fsycl">, Group, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enable SYCL kernels compilation for device">; +def fno_sycl : Flag<["-"], "fno-sycl">, Group,

[clang] 75f09b5 - Re-land "[Clang][Driver] Remove -M group options ..." and "[Clang] Avoid crashing when generating crash diagnostics when '#pragma clang __debug ..."

2020-02-07 Thread Alexandre Ganea via cfe-commits
Author: Alexandre Ganea Date: 2020-02-07T09:51:09-05:00 New Revision: 75f09b54429bee17a96e2ba7a2ac0f0a8a7f7e74 URL: https://github.com/llvm/llvm-project/commit/75f09b54429bee17a96e2ba7a2ac0f0a8a7f7e74 DIFF:

Re: patch via mailing list: Use getLocation() in too few/many arguments diagnostic

2020-02-07 Thread Aaron Ballman via cfe-commits
Thank you for the patch -- I think the changes look reasonable, but it should come with some test cases as well. Source location stuff is a bit onerous to try to test, but I think the best approach would be to add a new test that uses FileCheck instead of -verify so that you can validate the

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D72705#1863499 , @balazske wrote: > If more discussion is needed it is better to use "Discourse" instead of this > review? I've been meaning to suggest that we use either that or discord for casual chatting (for simple

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-07 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added inline comments. Comment at: clang/include/clang/Driver/Options.td:3414-3416 +def fsycl : Flag<["-"], "fsycl">, Group, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enable SYCL kernels compilation for device">; +def

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D73898#1863710 , @Szelethus wrote: > I wouldn't like to see reports emitted by a checker that resides in > `apiModeling`. Could we create a new one? Some checkers, like the > `IteratorChecker`, `MallocChecker` and

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Driver/Options.td:3414-3416 +def fsycl : Flag<["-"], "fsycl">, Group, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enable SYCL kernels compilation for device">; +def fno_sycl : Flag<["-"], "fno-sycl">, Group,

[PATCH] D74183: [IRGen] Add an alignment attribute to underaligned sret parameters

2020-02-07 Thread Steve Canon via Phabricator via cfe-commits
scanon added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2077 +getDataLayout().getABITypeAlignment(getTypes().ConvertType(RetTy))) + SRETAttrs.addAlignmentAttr(Align); ArgAttrs[IRFunctionArgs.getSRetArgNo()] = rjmccall wrote: >

[clang] ea9166b - [OPENMP50]Add parsing/sema for acq_rel clause.

2020-02-07 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-02-07T09:21:10-05:00 New Revision: ea9166b5a838d788a4ec0c9ddf0c83b09f49cfe4 URL: https://github.com/llvm/llvm-project/commit/ea9166b5a838d788a4ec0c9ddf0c83b09f49cfe4 DIFF: https://github.com/llvm/llvm-project/commit/ea9166b5a838d788a4ec0c9ddf0c83b09f49cfe4.diff

[PATCH] D74222: [AArch64][SVE] Add mul/mla/mls lane & dup intrinsics

2020-02-07 Thread Kerry McLaughlin via Phabricator via cfe-commits
kmclaughlin created this revision. kmclaughlin added reviewers: c-rhodes, sdesmalen, dancgr, efriedma. Herald added subscribers: psnobl, rkruppe, hiraditya, kristof.beyls, tschuett. Herald added a reviewer: rengolin. Herald added a project: LLVM. Implements the following intrinsics: -

[PATCH] D73897: [analyzer] StdLibraryFunctionsChecker refactor: remove macros

2020-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 243167. martong marked 6 inline comments as done. martong added a comment. - Describe what pure means Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73897/new/ https://reviews.llvm.org/D73897 Files:

[PATCH] D73897: [analyzer] StdLibraryFunctionsChecker refactor: remove macros

2020-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:33 // // This checker uses eval::Call for modeling "pure" functions, for which // their `FunctionSummaryTy' is a precise model. This avoids unnecessary

[PATCH] D67983: [ObjC] Diagnose implicit type coercion from ObjC 'Class' to object pointer types.

2020-02-07 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D67983#1863019 , @arphaman wrote: > @jyknight @rjmccall I'm not sure this change is 100% fine. For example, the > following code no longer compiles with ARC: > > @protocol Delegate > @end > > @interface X > >

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-07 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 243173. bader marked 2 inline comments as done. bader added a comment. Applied code review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72857/new/ https://reviews.llvm.org/D72857 Files:

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2547 + Opts.SYCL = Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false); + Opts.SYCLIsDevice = Args.hasArg(options::OPT_fsycl_is_device); `-fno-sycl` should not be

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-02-07 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:697-699 + // The behavior is undefined if the value of the argument is not + // representable as unsigned char or is

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-07 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2548 + Opts.SYCL = Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false); + Opts.SYCLIsDevice = Args.hasArg(options::OPT_fsycl_is_device); + if

[PATCH] D73742: [Clang][Driver] After default -fintegrated-cc1, fix report_fatal_error no longer generates preprocessed source + reproducer.sh

2020-02-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/tools/driver/cc1_main.cpp:73 // defined as an internal software error. Otherwise, exit with status 1. - exit(GenCrashDiag ? 70 : 1); + llvm::sys::Process::Exit(GenCrashDiag ? 70 : 1); } I don't think it

[PATCH] D73520: [analyzer] BugReporterVisitors: Refactor and documentation

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Thanks! Bug report generation seems far less of a mess than is used to be :) Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:44 -/// BugReporterVisitors are used to add custom diagnostics along a path. +///

Re: patch via mailing list: Use getLocation() in too few/many arguments diagnostic

2020-02-07 Thread Hubert Tong via cfe-commits
I think this looks okay. I think Richard or Aaron might be able to provide a more informed opinion. -- HT On Fri, Feb 7, 2020 at 10:06 AM John Marshall via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Ping. I am a newcomer to Clang so don't know who might be appropriate > reviewers to CC,

[PATCH] D73897: [analyzer] StdLibraryFunctionsChecker refactor: remove macros

2020-02-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:42-49 // The following standard C functions are currently supported: // // fgetc getline isdigit isupper // fread isalnum isgraph isxdigit //

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-02-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 243178. balazske added a comment. Adding a simplified version. - The check is only for "EOFOrNegative" case. - Long list of functions is removed. - Not checking for "access in condition". - Removed the warning if value is unused. Repository: rG LLVM

[clang] 2926917 - [clang] Fix linkage of nested lambdas.

2020-02-07 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2020-02-07T13:24:21-05:00 New Revision: 2926917f430d705f084813b63a40fafc61872524 URL: https://github.com/llvm/llvm-project/commit/2926917f430d705f084813b63a40fafc61872524 DIFF: https://github.com/llvm/llvm-project/commit/2926917f430d705f084813b63a40fafc61872524.diff

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-02-07 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks check-clang on mac and win: http://45.33.8.238/mac/7485/step_7.txt http://45.33.8.238/win/7753/step_7.txt Please revert and then investigate asynchronously, unless the fix is obvious. Comment at:

[PATCH] D74103: Implement P1766R1: diagnose giving non-C-compatible classes a typedef name for linkage purposes.

2020-02-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7ae1b4a0ce9c: Implement P1766R1: diagnose giving non-C-compatible classes a typedef name for… (authored by rsmith). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-02-07 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Reverted in b03c3d8c620 for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68720

[PATCH] D74229: [Clang] Cover '#pragma clang __debug overflow_stack' in tests

2020-02-07 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked an inline comment as done. aganea added inline comments. Comment at: clang/lib/Lex/Pragma.cpp:1148 +#ifdef __clang__ + __attribute__((optnone)) Would it be better if we had something like `LLVM_[DISABLE|ENABLE]_OPT` in `Compiler.h` instead of

[PATCH] D74229: [Clang] Cover '#pragma clang __debug overflow_stack' in tests

2020-02-07 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea created this revision. aganea added reviewers: rnk, hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. aganea marked an inline comment as done. aganea added inline comments. Comment at: clang/lib/Lex/Pragma.cpp:1148 +#ifdef __clang__ +

[PATCH] D73916: [clang] Add `forceReload` clangd extension to 'textDocument/didChange'

2020-02-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for this. It makes me a bit sad but I don't really see a clean way to make this "just work". Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:653 - Server->addDocument(File, *Contents, WantDiags); + Server->addDocument(File,

[PATCH] D73916: [clang] Add `forceReload` clangd extension to 'textDocument/didChange'

2020-02-07 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 243251. dgoldman marked 5 inline comments as done. dgoldman added a comment. - Refactor to use `forceRebuild` and `ParseOptions` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73916/new/

[PATCH] D73916: [clang] Add `forceReload` clangd extension to 'textDocument/didChange'

2020-02-07 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked an inline comment as done. dgoldman added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:653 - Server->addDocument(File, *Contents, WantDiags); + Server->addDocument(File, *Contents, WantDiags, ForceReload); }

[PATCH] D74094: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2020-02-07 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:3687 - args.add(EmitAnyExprToTemp(E), type); } Is there any other use of `EmitAnyExprToTemp` that can benefit from this? CHANGES SINCE LAST ACTION

[clang] b03c3d8 - Revert "Support -fstack-clash-protection for x86"

2020-02-07 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2020-02-07T14:49:38-05:00 New Revision: b03c3d8c62096af1e27b23480fa4623bb64bfab9 URL: https://github.com/llvm/llvm-project/commit/b03c3d8c62096af1e27b23480fa4623bb64bfab9 DIFF: https://github.com/llvm/llvm-project/commit/b03c3d8c62096af1e27b23480fa4623bb64bfab9.diff

[PATCH] D73701: [clang] fix linkage of nested lambda

2020-02-07 Thread Philippe Daouadi via Phabricator via cfe-commits
blastrock added a comment. Thanks for the reviews! I do not have commit access, so please merge this whenever you can. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73701/new/ https://reviews.llvm.org/D73701

[PATCH] D74234: [clang] [NFC] Change boolean SuppressUserConversions parameters to an enum

2020-02-07 Thread Logan Smith via Phabricator via cfe-commits
logan-5 created this revision. logan-5 added a reviewer: rsmith. logan-5 added a project: clang. Herald added a subscriber: cfe-commits. logan-5 added a child revision: D74238: [clang] [clang] Improve diagnostic note for implicit conversion sequences that would work if more than one implicit

[PATCH] D74238: [clang] [clang] Improve diagnostic note for implicit conversion sequences that would work if more than one implicit user-defined conversion were allowed.

2020-02-07 Thread Logan Smith via Phabricator via cfe-commits
logan-5 created this revision. logan-5 added a reviewer: rsmith. logan-5 added a project: clang. Herald added a subscriber: cfe-commits. The current text of the 'note' diagnostic for bad conversions is confusing in the presence of user-defined conversion operations: https://godbolt.org/z/zrgeHH

[PATCH] D74009: [clang] Improve diagnostic note for implicit conversions that are disallowed because they involve more than one user-defined conversion.

2020-02-07 Thread Logan Smith via Phabricator via cfe-commits
logan-5 abandoned this revision. logan-5 added a comment. I split this patch into multiple, and reworked the implementation. The new stuff lives here and here and here: D74238 D74234 D74235

[PATCH] D74235: [clang] [NFC] Rename Sema::DiagnoseMultipleUserConversion to DiagnoseAmbiguousUserConversion

2020-02-07 Thread Logan Smith via Phabricator via cfe-commits
logan-5 created this revision. logan-5 added a reviewer: rsmith. logan-5 added a project: clang. Herald added a subscriber: cfe-commits. logan-5 added a child revision: D74238: [clang] [clang] Improve diagnostic note for implicit conversion sequences that would work if more than one implicit

[PATCH] D73701: [clang] fix linkage of nested lambda

2020-02-07 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2926917f430d: [clang] Fix linkage of nested lambdas. (authored by hliao). Changed prior to commit: https://reviews.llvm.org/D73701?vs=241713=243224#toc Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D73967: Implement _ExtInt as an extended int type specifier.

2020-02-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 243248. erichkeane added a comment. Remove conversions between _ExtInt until WG14 decides what should be done with them. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73967/new/ https://reviews.llvm.org/D73967 Files:

[PATCH] D74094: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas

2020-02-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 243243. erik.pilkington marked 2 inline comments as done. erik.pilkington added a comment. Disable the optimization for non-trivially destructible types. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74094/new/

[clang] 42efd35 - [cxx_status] Fix status of P1766R to not bleed into adjacent cells.

2020-02-07 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-02-07T11:54:48-08:00 New Revision: 42efd35ba04daa2b74f69a05877927af0a8fcbb0 URL: https://github.com/llvm/llvm-project/commit/42efd35ba04daa2b74f69a05877927af0a8fcbb0 DIFF: https://github.com/llvm/llvm-project/commit/42efd35ba04daa2b74f69a05877927af0a8fcbb0.diff

[PATCH] D73543: [clang] Add support for __builtin_memcpy_inline

2020-02-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Sorry about the delayed response, I was traveling. Comment at: clang/docs/LanguageExtensions.rst:2252 + + * ``__builtin_memcpy_inline`` + gchatelet wrote: > efriedma wrote: > > This is in the wrong section of the documentation. We

[clang] e8e05de - [OPENMP50]Add codegen for acq_rel clause in atomic|flush directives.

2020-02-07 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-02-07T15:05:09-05:00 New Revision: e8e05de08bea1931420da19462533a8caa4b0e26 URL: https://github.com/llvm/llvm-project/commit/e8e05de08bea1931420da19462533a8caa4b0e26 DIFF: https://github.com/llvm/llvm-project/commit/e8e05de08bea1931420da19462533a8caa4b0e26.diff

[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

2020-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. This shouldn't be an expensive function call, and being a little inefficient on the error path to get better diagnostics is a good trade-off. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74116/new/ https://reviews.llvm.org/D74116

[PATCH] D74183: [IRGen] Add an alignment attribute to underaligned sret parameters

2020-02-07 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2077 +getDataLayout().getABITypeAlignment(getTypes().ConvertType(RetTy))) + SRETAttrs.addAlignmentAttr(Align); ArgAttrs[IRFunctionArgs.getSRetArgNo()] = scanon wrote: >

[PATCH] D73701: [clang] fix linkage of nested lambda

2020-02-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D73701#1864136 , @blastrock wrote: > Thanks for the reviews! I do not have commit access, so please merge this > whenever you can. done in 2926917f430 .

[PATCH] D74183: [IRGen] Add an alignment attribute to underaligned sret parameters

2020-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2077 +getDataLayout().getABITypeAlignment(getTypes().ConvertType(RetTy))) + SRETAttrs.addAlignmentAttr(Align); ArgAttrs[IRFunctionArgs.getSRetArgNo()] = rjmccall wrote: >

[PATCH] D74183: [IRGen] Add an alignment attribute to underaligned sret parameters

2020-02-07 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2077 +getDataLayout().getABITypeAlignment(getTypes().ConvertType(RetTy))) + SRETAttrs.addAlignmentAttr(Align); ArgAttrs[IRFunctionArgs.getSRetArgNo()] = rjmccall wrote:

  1   2   >