[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

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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:

[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

[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] 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] 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] 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.

[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] 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] 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] 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] 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] 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

[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] 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] 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] 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

[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

[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] 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] 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

[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] 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] 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

<    1   2