[PATCH] D85528: [analyzer] Fix cast evaluation on scoped enums in ExprEngine

2020-08-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Looks reasonable to me, but I am not very familiar with the impacts of the additional casts. Do we lose some modeling power when we are using the regular constraint solver? For example, when we have constraints both on the original and the cased symbol can the analyz

[PATCH] D77598: Integral template argument suffix and cast printing

2020-08-09 Thread Pratyush Das via Phabricator via cfe-commits
reikdas updated this revision to Diff 284181. reikdas edited the summary of this revision. reikdas added a comment. Addresses inline comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77598/new/ https://reviews.llvm.org/D77598 Files: clang/lib/AST/TemplateBase.cpp clang/lib/Se

[PATCH] D77598: Integral template argument suffix and cast printing

2020-08-09 Thread Pratyush Das via Phabricator via cfe-commits
reikdas added inline comments. Comment at: clang/lib/AST/TemplateBase.cpp:71-72 if (T->isBooleanType() && !Policy.MSVCFormatting) { Out << (Val.getBoolValue() ? "true" : "false"); } else if (T->isCharType()) { rsmith wrote: > rsmith wrote: > > It loo

[clang] 04a23f1 - [Diagnostics] Turn string concat warning to avoid false positives

2020-08-09 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2020-08-09T12:22:29+02:00 New Revision: 04a23f1fe08a6ad0baf1305d7308231d2cb4843b URL: https://github.com/llvm/llvm-project/commit/04a23f1fe08a6ad0baf1305d7308231d2cb4843b DIFF: https://github.com/llvm/llvm-project/commit/04a23f1fe08a6ad0baf1305d7308231d2cb4843b.dif

[PATCH] D85528: [analyzer] Fix cast evaluation on scoped enums in ExprEngine

2020-08-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D85528#2205094 , @xazax.hun wrote: > Looks reasonable to me, but I am not very familiar with the impacts of the > additional casts. Do we lose some modeling power when we are using the > regular constraint solver? > > For exa

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-09 Thread Maximilian Fickert via Phabricator via cfe-commits
fickert created this revision. fickert added reviewers: clang-format, MyDeveloperDay. fickert added projects: clang-format, clang-tools-extra. Herald added a project: clang. Herald added a subscriber: cfe-commits. fickert requested review of this revision. Use spaces to align binary and ternary ex

[PATCH] D85600: [clang-format] use spaces for alignment of binary/ternary expressions with UT_AlignWithSpaces

2020-08-09 Thread Maximilian Fickert via Phabricator via cfe-commits
fickert added a comment. This fixes an oversight in the new `UT_AlignWithSpaces` option (see D75034 ), which did not correctly identify the alignment of binary/ternary expressions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D85528: [analyzer] Fix cast evaluation on scoped enums in ExprEngine

2020-08-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I mean, this shouldn't be an issue. Since we already omitted the 'unnecessary' cast expressions... That decision is the root cause of this, we should have expected that. IMO we do the right thing here. If we want to treat sym and sym2 to refer to the same symbol, we s

[PATCH] D77598: Integral template argument suffix and cast printing

2020-08-09 Thread Pratyush Das via Phabricator via cfe-commits
reikdas updated this revision to Diff 284186. reikdas added a comment. Can completely replace CanonParamType. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77598/new/ https://reviews.llvm.org/D77598 Files: clang/lib/AST/TemplateBase.cpp clang/lib/Sema/SemaTemplate.cpp clang/test/

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: rsmith, rjmccall. Mordante added a project: clang. Mordante requested review of this revision. Fixes PR46484: Clang crash in clang/lib/Sema/SemaChecking.cpp:10028 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D85601 Fil

[PATCH] D79219: [CMake] Simplify CMake handling for zlib

2020-08-09 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I have finally managed to reproduce the issue on my Windows machine, the latest version of the patch should address the issue. The previous logic would fail to find zlib altogether on Windows, which is why this issue haven't manifested before. `find_package` locates the

[PATCH] D79219: [CMake] Simplify CMake handling for zlib

2020-08-09 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 284161. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79219/new/ https://reviews.llvm.org/D79219 Files: clang/test/CMakeLists.txt clang/test/lit.site.cfg.py.in compiler-rt/test/lit.common.configured.in lld/test/CMakeLists.txt lld/test/lit.si

[PATCH] D85599: [Clang] Consider __builtin_trap() and __builtin_debugtrap() as terminator

2020-08-09 Thread Zhang Kang via Phabricator via cfe-commits
ZhangKang created this revision. ZhangKang added reviewers: PowerPC, nemanjai, ahatanak, vitalybuka, dblaikie. ZhangKang added a project: LLVM. Herald added subscribers: Sanitizers, cfe-commits, steven.zhang, wuzish, dexonsmith, kristof.beyls. Herald added projects: clang, Sanitizers. ZhangKang re

[PATCH] D79219: [CMake] Simplify CMake handling for zlib

2020-08-09 Thread Petr Hosek via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGccbc1485b55f: [CMake] Simplify CMake handling for zlib (authored by phosek). Repository: rG LLVM Github Monorepo CHANG

[clang] 975467e - [Diagnostics] Handle string concat pattern and avoid false positives

2020-08-09 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2020-08-09T16:02:41+02:00 New Revision: 975467e4aa7ce1b8fcf4af0e25cdf053cfa8669e URL: https://github.com/llvm/llvm-project/commit/975467e4aa7ce1b8fcf4af0e25cdf053cfa8669e DIFF: https://github.com/llvm/llvm-project/commit/975467e4aa7ce1b8fcf4af0e25cdf053cfa8669e.dif

[PATCH] D83088: Introduce CfgTraits abstraction

2020-08-09 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle updated this revision to Diff 284195. nhaehnle marked 2 inline comments as done. nhaehnle added a comment. v7: - std::forward fix in wrapping_iterator - fix typos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83088/new/ https://revie

[PATCH] D85607: CfgTraits: add CfgInstructionRef

2020-08-09 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle created this revision. nhaehnle added reviewers: arsenm, foad, sameerds. Herald added subscribers: cfe-commits, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini, rogfer01, kuhar, hira

[PATCH] D85611: Improve dynamic AST matching diagnostics for conversion errors

2020-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: steveire, sbenza, klimek, sammccall. aaron.ballman requested review of this revision. Currently, when marshaling a dynamic AST matchers, we check for the type and value validity of matcher arguments at the same time for some matc

Re: [clang] 975467e - [Diagnostics] Handle string concat pattern and avoid false positives

2020-08-09 Thread Arthur O'Dwyer via cfe-commits
Hi Dávid, Does this part of the patch imply that we *don't *want to warn on "foo" TWO ? and if so, why not? Anyway, I think at least "foo" TWO should be kept in the test suite, as a test-for-absence-of-warning. TWO "bar", - "foo" TW

Re: [clang] 975467e - [Diagnostics] Handle string concat pattern and avoid false positives

2020-08-09 Thread Dávid Bolvanský via cfe-commits
We warn if it is just one occurance and next literal is not split too. I changed test to test other scenario. I could add that test back, but I think we have enough tests to cover code. We should not warn for code pattern: { “a” “b”, “c” “d” } > Dňa 9. 8. 2020 o 17:49 užívateľ Arthur O'Dwyer

[PATCH] D85612: [Sema] Use proper integral cast for an enumerate with a fixed bool type

2020-08-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: aaron.ballman, dblaikie, rsmith. Mordante added a project: clang. Herald added a subscriber: dexonsmith. Mordante requested review of this revision. When casting an enumerate with a fixed bool type the casting should use an IntegralToBoole

[PATCH] D85613: [clang] Look through bindings when checking whether a default argument references a local entity.

2020-08-09 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: rsmith, erichkeane, rjmccall. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. riccibruno requested review of this revision. Currently clang accepts a default argument containing a structured binding which is

[PATCH] D85612: [Sema] Use proper integral cast for an enumerate with a fixed bool type

2020-08-09 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/test/AST/ast-dump-enum-bool.cpp:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ast-dump=json %s | FileCheck %s + Why a (pretty unreadable) json test? There is also `make-ast-dump-check.sh`

[PATCH] D85612: [Sema] Use proper integral cast for an enumerate with a fixed bool type

2020-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/ast-dump-enum-bool.cpp:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ast-dump=json %s | FileCheck %s + riccibruno wrote: > Why a (pretty unreadable) json test? There is also `m

[PATCH] D84600: [Analyzer] Support note tags for smart ptr checker

2020-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/smart-ptr-text-output.cpp:79 + +// TODO: Enabale this test when "std::swap" is modeled seperately. +void derefOnStdSwappedNullPtr() { vrnithinkumar wrote: > vrnithinkumar wrote: > > NoQ wrote: > > > Inste

[PATCH] D85144: [clang] Improve Dumping of APValues

2020-08-09 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. I agree with you that it's fine to use `printPretty` for leaves (and additionally it would be annoying to duplicate the `LValue` case); that's what I was planning to do anyway. What I am not sure I agree with is the additional complexity to handle the (debugger-onl

[clang] 898880f - [clang] Fix typo in comment

2020-08-09 Thread Dávid Bolvanský via cfe-commits
Author: Gousemoodhin Nadaf Date: 2020-08-09T21:04:00+02:00 New Revision: 898880fe4e329ce7fc6bbe30f309ef3b91535c21 URL: https://github.com/llvm/llvm-project/commit/898880fe4e329ce7fc6bbe30f309ef3b91535c21 DIFF: https://github.com/llvm/llvm-project/commit/898880fe4e329ce7fc6bbe30f309ef3b91535c21.

[PATCH] D85568: [clang] Fix typo in comment

2020-08-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG898880fe4e32: [clang] Fix typo in comment (authored by gousemoodhin, committed by xbolva00). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo C

[PATCH] D85619: [clang][OpenMP][OMPBuilder] Use OMPBuilder to CG `omp single`

2020-08-09 Thread Fady Ghanim via Phabricator via cfe-commits
fghanim created this revision. Herald added subscribers: cfe-commits, aaron.ballman, guansong, yaxunl. Herald added a project: clang. fghanim requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. ADD support to allow `omp single` to be CG-ed by

[PATCH] D85619: [clang][OpenMP][OMPBuilder] Use OMPBuilder to CG `omp single`

2020-08-09 Thread Fady Ghanim via Phabricator via cfe-commits
fghanim added a comment. Feel free to add other reviewers. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85619/new/ https://reviews.llvm.org/D85619 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D85502: [clangd] Add more error details on the remote index server side

2020-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 284230. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Resolve post-LGTM comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85502/new/ https://reviews.llvm.org/D85502 Files: clang

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Did this only crash during error recovery before, or also for your `void g()` example? If we were only crashing in error recovery, that would suggest that error recovery was producing a bad AST, and perhaps we should be fixing this elsewhere. Comment

[PATCH] D85502: [clangd] Add more error details on the remote index server side

2020-08-09 Thread Kirill Bobyrev 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 rG836f937a1f11: [clangd] Add more error details on the remote index server side (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES

[clang-tools-extra] 836f937 - [clangd] Add more error details on the remote index server side

2020-08-09 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2020-08-09T22:12:56+02:00 New Revision: 836f937a1f1150d81c0bf2b6a14872146da5b89e URL: https://github.com/llvm/llvm-project/commit/836f937a1f1150d81c0bf2b6a14872146da5b89e DIFF: https://github.com/llvm/llvm-project/commit/836f937a1f1150d81c0bf2b6a14872146da5b89e.diff

[clang] 9658647 - [AST] Fixed string concatenation warnings

2020-08-09 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2020-08-09T23:09:19+02:00 New Revision: 9658647d72d24f339f8b8129da9f116c358f30d5 URL: https://github.com/llvm/llvm-project/commit/9658647d72d24f339f8b8129da9f116c358f30d5 DIFF: https://github.com/llvm/llvm-project/commit/9658647d72d24f339f8b8129da9f116c358f30d5.dif

[clang] eeb7c49 - [AST] Fixed string list in test

2020-08-09 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2020-08-09T23:17:48+02:00 New Revision: eeb7c496e385d2a88c39a0e0ebfe8a9908762cc3 URL: https://github.com/llvm/llvm-project/commit/eeb7c496e385d2a88c39a0e0ebfe8a9908762cc3 DIFF: https://github.com/llvm/llvm-project/commit/eeb7c496e385d2a88c39a0e0ebfe8a9908762cc3.dif

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 284234. MaskRay added a comment. Add binutilsIsAtleast() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85474/new/ https://reviews.llvm.org/D85474 Files: clang/include/clang/Basic/CodeGenOptions.h clang/inc

[PATCH] D84600: [Analyzer] Support note tags for smart ptr checker

2020-08-09 Thread Nithin VR via Phabricator via cfe-commits
vrnithinkumar added inline comments. Comment at: clang/test/Analysis/smart-ptr-text-output.cpp:79 + +// TODO: Enabale this test when "std::swap" is modeled seperately. +void derefOnStdSwappedNullPtr() { NoQ wrote: > vrnithinkumar wrote: > > vrnithinkumar wrote: >

[PATCH] D84600: [Analyzer] Support note tags for smart ptr checker

2020-08-09 Thread Nithin VR via Phabricator via cfe-commits
vrnithinkumar updated this revision to Diff 284237. vrnithinkumar marked an inline comment as done. vrnithinkumar added a comment. - Updating test with tags from header file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84600/new/ https://reviews.l

[clang] 92e82a2 - int64_t and intmax_t are always (signed) long long on OpenBSD.

2020-08-09 Thread Brad Smith via cfe-commits
Author: Brad Smith Date: 2020-08-09T19:43:16-04:00 New Revision: 92e82a2890c38bbb158cbf9dd592328b4c383696 URL: https://github.com/llvm/llvm-project/commit/92e82a2890c38bbb158cbf9dd592328b4c383696 DIFF: https://github.com/llvm/llvm-project/commit/92e82a2890c38bbb158cbf9dd592328b4c383696.diff LO

[PATCH] D85621: [clang] Allow DynTypedNode to store a TemplateArgumentLoc

2020-08-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: hokein. Herald added a project: clang. Herald added a subscriber: cfe-commits. nridge requested review of this revision. The patch also adds a templateArgumentLoc() AST matcher. Repository: rG LLVM Github Monorepo https://reviews.llvm.org

[PATCH] D85503: [clangd] Have template template arguments target their referenced template decl

2020-08-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 284245. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85503/new/ https://reviews.llvm.org/D85503 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tools-ex

[PATCH] D85503: [clangd] Have template template arguments target their referenced template decl

2020-08-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I've added the matcher and split the clang parts into D85621 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85503/new/ https://reviews.llvm.org/D85503 __

[clang] f5fdb61 - Re-enable OpenBSD PowerPC64 tests.

2020-08-09 Thread Brad Smith via cfe-commits
Author: Brad Smith Date: 2020-08-09T20:52:43-04:00 New Revision: f5fdb6141c5e7a76a10ea702d6fc046692827c43 URL: https://github.com/llvm/llvm-project/commit/f5fdb6141c5e7a76a10ea702d6fc046692827c43 DIFF: https://github.com/llvm/llvm-project/commit/f5fdb6141c5e7a76a10ea702d6fc046692827c43.diff LO

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 284246. aqjune added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update PR3589-freestanding-libcalls.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85345/new/ https://revie

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee 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 rGef018cb65c98: [BuildLibCalls] Add noundef to standard I/O functions (authored by aqjune). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] ef018cb - [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee via cfe-commits
Author: Juneyoung Lee Date: 2020-08-10T10:58:25+09:00 New Revision: ef018cb65c98fdb517930b762b3b3a3c0dd4dbdd URL: https://github.com/llvm/llvm-project/commit/ef018cb65c98fdb517930b762b3b3a3c0dd4dbdd DIFF: https://github.com/llvm/llvm-project/commit/ef018cb65c98fdb517930b762b3b3a3c0dd4dbdd.diff

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. If things go well, I'll add noundef to other library functions such as utime, setenv, unsetenv, as well. For malloc/calloc/realloc/free, I'll think more about them. I guess it is safe to tag noundef to free's operand, but for malloc I'm not 100% sure... Repository:

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D85345#2205691 , @aqjune wrote: > If things go well, I'll add noundef to other library functions such as utime, > setenv, unsetenv, as well. > For malloc/calloc/realloc/free, I'll think more about them. I guess it is >

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. What about undef or poison is given to malloc? If it should raise UB, the size argument and returned pointer should be noundef. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85345/new/ https://reviews.llvm.org/D85345 _

[PATCH] D83338: [PowerPC][Power10] Implemented Vector Shift Builtins

2020-08-09 Thread Amy Kwan via Phabricator via cfe-commits
amyk accepted this revision. amyk added a comment. This revision is now accepted and ready to land. Thanks for addressing the comments. LGTM. Comment at: llvm/test/CodeGen/PowerPC/p10-vector-shift.ll:10 + +; These tests ensure that vector shift quadword builtins are correctly +

[PATCH] D85612: [Sema] Use proper integral cast for an enumerate with a fixed bool type

2020-08-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/AST/ast-dump-enum-bool.cpp:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ast-dump=json %s | FileCheck %s + aaron.ballman wrote: > riccibruno wrote: > > Why a (pretty unreadable) json test

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D85345#2205712 , @aqjune wrote: > What about undef or poison is given to malloc? If it should raise UB, the > size argument and returned pointer should be noundef. It is unclear to me if we want to forbid undef to be passed

[PATCH] D85424: [Analyzer] Crash fix for alpha.cplusplus.IteratorRange

2020-08-09 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D85424#2203329 , @NoQ wrote: > Tests? (edit: ok, i see, you have trouble reducing the test. yes, we > absolutely need a test, please finish with creduce/delta.) I will not commit it without tests, even if someone ac

[PATCH] D85613: [clang] Look through bindings when checking whether a default argument references a local entity.

2020-08-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:101-105 +if (const VarDecl *HoldingVar = Binding->getHoldingVar()) { + // C++20 [dcl.struct.bind]p4: + // Each vi is the name [...] that refers to the object bound to ri [...] + Decl =

[PATCH] D85523: [clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` was undefined after definition.

2020-08-09 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 284257. ArcsinX added a comment. newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85523/new/ https://reviews.llvm.org/D85523 Files: clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp

[PATCH] D85590: [clang][HeaderInsert] Do not treat defines with values as header guards

2020-08-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Tooling/HeaderIncludesTest.cpp:532 +TEST_F(HeaderIncludesTest, FakeHeaderGuardIfnDef) { + std::string Code = "#ifndef A_H\n" --

[clang] 6170072 - Improve modeling of variable template specializations with dependent

2020-08-09 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-08-09T23:22:26-07:00 New Revision: 617007240cbfb97c8ccf6d61b0c4ca0bb62d43c9 URL: https://github.com/llvm/llvm-project/commit/617007240cbfb97c8ccf6d61b0c4ca0bb62d43c9 DIFF: https://github.com/llvm/llvm-project/commit/617007240cbfb97c8ccf6d61b0c4ca0bb62d43c9.diff

[PATCH] D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting

2020-08-09 Thread Ruijie Fang via Phabricator via cfe-commits
rjf added a comment. Herald added subscribers: dang, nikic. Would also really like to see this patch landed. Also, as of today (8/10/2020), the patch cannot be cleanly applied into trunk without inducing merge conflicts anymore. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57265/new/

[PATCH] D85528: [analyzer] Fix cast evaluation on scoped enums in ExprEngine

2020-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D85528#2204664 , @steakhal wrote: > In D85528#2203325 , @NoQ wrote: > >> Because this patch changes the behavior of regular analysis (without Z3), i >> expect tests to reflect that. > > What

[PATCH] D85424: [Analyzer] Crash fix for alpha.cplusplus.IteratorRange

2020-08-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorRangeChecker.cpp:228 if (auto ValAsLoc = RHS.getAs()) { Value = State->getRawSVal(*ValAsLoc); } Well, it looks like your value is not necessarily a function argument. The

[clang] a4ca710 - More cleanup after removing the ability to reference a dependent

2020-08-09 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-08-09T23:40:22-07:00 New Revision: a4ca710d9ca9a779a97050149a483f7a5b24dd02 URL: https://github.com/llvm/llvm-project/commit/a4ca710d9ca9a779a97050149a483f7a5b24dd02 DIFF: https://github.com/llvm/llvm-project/commit/a4ca710d9ca9a779a97050149a483f7a5b24dd02.diff

[PATCH] D85621: [clang] Allow DynTypedNode to store a TemplateArgumentLoc

2020-08-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks. Please run `clang/docs/tools/dump_ast_matchers.py` script to update the `LibASTMatchersReference.html` file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D85503: [clangd] Have template template arguments target their referenced template decl

2020-08-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:482 } + bool TraverseTemplateArgumentLoc(const TemplateArgumentLoc &X) { +return traverseNode(&X, can we add a test for the `Selection`? Repository: rG LLVM Github Monore

[PATCH] D85525: [clang-tidy] Fix a crash in bugprone-not-null-terminated-result check when `__STDC_WANT_LIB_EXT1__` is not a literal.

2020-08-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:806 const auto &T = MI->tokens().back(); -StringRef ValueStr = StringRef(T.getLiteralData(), T.getLength()); -llvm::APInt IntValue; -

[PATCH] D85625: Fix documentation URL in AvoidBindCheck.h

2020-08-09 Thread Christoph Bachhuber via Phabricator via cfe-commits
cbachhuber created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. cbachhuber requested review of this revision. The URL on current master is a 404. This change fixes that and leads to the correct page. Repository: rG LLVM Github Monorepo https://reviews

[PATCH] D83536: [clangd] Index refs to main-file symbols as well

2020-08-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 284262. nridge added a comment. Add the requested flag Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83536/new/ https://reviews.llvm.org/D83536 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-e

[PATCH] D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting

2020-08-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D57265#2205797 , @rjf wrote: > Would also really like to see this patch landed. Also, as of today > (8/10/2020), the patch cannot be cleanly applied into trunk without inducing > merge conflicts anymore. You might have some lu