[PATCH] D72028: [CodeGen] Emit conj/conjf/confjl libcalls as fneg instructions if possible.

2019-12-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: spatel, efriedma, rjmccall. Herald added a project: clang. We already recognize the __builtin versions of these, might as well recognize the libcall version. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72028

[PATCH] D72014: [PowerPC]: Add powerpcspe target triple subarch component

2019-12-30 Thread Jim Lin via Phabricator via cfe-commits
Jim added a comment. Could you add tests in llvm/unittests/ADT/TripleTest.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72014/new/ https://reviews.llvm.org/D72014 ___ cfe-commits mailing list

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:62 Finder->addMatcher( - ifStmt(stmt().bind("if"), + ifStmt(unless(allOf(isConstexpr(), isInTemplateInstantiation())), + stmt().bind("if"),

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. Please add new lines to the end of the test files. Also please add a test similar to the godbolt link you gave me to show that `if consexpr (false)`

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:62 Finder->addMatcher( - ifStmt(stmt().bind("if"), + ifStmt(unless(allOf(isConstexpr(), isInTemplateInstantiation())), + stmt().bind("if"),

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:62 Finder->addMatcher( - ifStmt(stmt().bind("if"), + ifStmt(unless(allOf(isConstexpr(), isInTemplateInstantiation())), + stmt().bind("if"),

[PATCH] D72014: [PowerPC]: Add powerpcspe target triple subarch component

2019-12-30 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits updated this revision to Diff 235668. jhibbits added a comment. Reuse the SPE feature test preprocessor test check instead of duplicating it. powerpcspe-* is exactly equivalent to the -mspe command line argument. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72014: [PowerPC]: Add powerpcspe target triple subarch component

2019-12-30 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits marked an inline comment as done. jhibbits added inline comments. Comment at: clang/test/Preprocessor/init.c:7628 +// PPC32-SPE-TGT:#define __SPE__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-linux-gnu -target-cpu 8548 < /dev/null |

[PATCH] D71982: [docs] Update path to clang-tools-extra

2019-12-30 Thread Jim Lin via Phabricator via cfe-commits
Jim added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/Contributing.rst:66 -Once you are done, change to the ``llvm/tools/clang/tools/extra`` directory, and +Once you are done, change to the ``llvm/clang-tools-extra`` directory, and let's start!

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. In D71980#1799437 , @xazax.hun wrote: > Thanks for working on this, please see one of my concerns inline. > > If you are trying to fix this problem, alternatively, you could also fix it

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235661. njames93 added a comment. Fixed a few of the test cases failing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp

[PATCH] D71991: Fix external-names.c test when separator is \\

2019-12-30 Thread Adrian McCarthy via Phabricator via cfe-commits
amccarth added a comment. I'm still not seeing how the backslashes got in there for you. They don't happen for me. It looks like these paths come (almost) directly from the temp .yaml files created by the `sed` commands at the beginning of the test, so--for these particular tests--I'd expect

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Thanks for working on this, please see one of my concerns inline. If you are trying to fix this problem, alternatively, you could also fix it in Clang. Richard outlined the best possible way to solve this class of errors by introducing a new type of AST node in:

[PATCH] D69758: [Gnu toolchain] Look at standard GCC paths for libstdcxx by default

2019-12-30 Thread Samuel Thibault via Phabricator via cfe-commits
sthibaul marked an inline comment as done. sthibaul added a comment. > [Gnu toolchain] > maybe this can be removed in the title? I thought that commits usually have such kind of title prefixes? Comment at: clang/lib/Driver/ToolChains/Linux.cpp:36 /// /// Debian-based

[PATCH] D72018: [attributes] [analyzer] Add an attribute to prevent checkers from modeling a function

2019-12-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: aaron.ballman, NoQ, haowei. xazax.hun added a project: clang. Herald added subscribers: Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. While the static analyzer is

[PATCH] D69758: [Gnu toolchain] Look at standard GCC paths for libstdcxx by default

2019-12-30 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru requested changes to this revision. sylvestre.ledru added a comment. This revision now requires changes to proceed. //[Gnu toolchain] // maybe this can be removed in the title? Comment at: clang/lib/Driver/ToolChains/Linux.cpp:36 /// /// Debian-based systems

[PATCH] D69758: [Gnu toolchain] Look at standard GCC paths for libstdcxx by default

2019-12-30 Thread Samuel Thibault via Phabricator via cfe-commits
sthibaul added a comment. I have updated the patch to the latest git and re-ran checks. Could somebody have a look at it please? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69758/new/ https://reviews.llvm.org/D69758 ___ cfe-commits

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235645. njames93 retitled this revision from "[clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone, ReadabilityBracesAroundStatements and ReadabilityMisleadingIndentation" to "[clang-tidy] Disable Checks

[PATCH] D69758: [Gnu toolchain] Look at standard GCC paths for libstdcxx by default

2019-12-30 Thread Samuel Thibault via Phabricator via cfe-commits
sthibaul updated this revision to Diff 235644. sthibaul marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69758/new/ https://reviews.llvm.org/D69758 Files: clang/lib/Driver/ToolChains/Gnu.cpp clang/lib/Driver/ToolChains/Gnu.h

[PATCH] D72014: [PowerPC]: Add powerpcspe target triple subarch component

2019-12-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/test/Preprocessor/init.c:7628 +// PPC32-SPE-TGT:#define __SPE__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-linux-gnu -target-cpu 8548 < /dev/null | FileCheck -match-full-lines -check-prefix

[PATCH] D71775: [ThreadPool] On Windows, extend usage to all CPU sockets and all NUMA groups

2019-12-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added subscribers: inglorion, gbiv. rnk added a comment. Herald added a subscriber: george.burgess.iv. +@gbiv @inglorion, other ThinLTO users. > To solve this situation, we capture (and retain) the initial intention until > the point of usage, through a new ThreadPoolStrategy class. The

[PATCH] D72012: [CodeGen] Use IRBuilder::CreateFNeg for __builtin_conj

2019-12-30 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG70f8dd4cf604: [CodeGen] Use IRBuilder::CreateFNeg for __builtin_conj (authored by craig.topper). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72010: [CodeGen] Use CreateFNeg in buildFMulAdd

2019-12-30 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8b23b2bbd962: [CodeGen] Use CreateFNeg in buildFMulAdd (authored by craig.topper). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 70f8dd4 - [CodeGen] Use IRBuilder::CreateFNeg for __builtin_conj

2019-12-30 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2019-12-30T13:25:23-08:00 New Revision: 70f8dd4cf604b2be3488895ef0d261154c1c1124 URL: https://github.com/llvm/llvm-project/commit/70f8dd4cf604b2be3488895ef0d261154c1c1124 DIFF: https://github.com/llvm/llvm-project/commit/70f8dd4cf604b2be3488895ef0d261154c1c1124.diff

[clang] 8b23b2b - [CodeGen] Use CreateFNeg in buildFMulAdd

2019-12-30 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2019-12-30T13:24:11-08:00 New Revision: 8b23b2bbd9622c5f079a71c7078d167052f6a70c URL: https://github.com/llvm/llvm-project/commit/8b23b2bbd9622c5f079a71c7078d167052f6a70c DIFF: https://github.com/llvm/llvm-project/commit/8b23b2bbd9622c5f079a71c7078d167052f6a70c.diff

[PATCH] D72014: [PowerPC]: Add powerpcspe target triple subarch component

2019-12-30 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits updated this revision to Diff 235637. jhibbits added a comment. Fix a test typo made at the last minute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72014/new/ https://reviews.llvm.org/D72014 Files: clang/lib/Basic/Targets/PPC.cpp

[PATCH] D72014: [PowerPC]: Add powerpcspe target triple subarch component

2019-12-30 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits created this revision. jhibbits added a reviewer: PowerPC. Herald added subscribers: llvm-commits, cfe-commits, steven.zhang, shchenz, jsji, dexonsmith, kbarton, hiraditya, krytarowski, arichardson, nemanjai, emaste. Herald added projects: clang, LLVM. This allows the use of '-target

[clang] 6bd1fcd - [OpenMP][FIX] Generalize a test check line

2019-12-30 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2019-12-30T15:01:14-06:00 New Revision: 6bd1fcd795994f484e8f974be566edbbbf23927d URL: https://github.com/llvm/llvm-project/commit/6bd1fcd795994f484e8f974be566edbbbf23927d DIFF:

[PATCH] D72010: [CodeGen] Use CreateFNeg in buildFMulAdd

2019-12-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3350 +MulOp0 = Builder.CreateFNeg(MulOp0, "neg"); + if (negAdd) +Addend = Builder.CreateFNeg(Addend, "neg"); craig.topper wrote: > I removed the 'else' here because logically

[PATCH] D72012: [CodeGen] Use IRBuilder::CreateFNeg for __builtin_conj

2019-12-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: spatel, efriedma, rjmccall, cameron.mcinally. This replaces the fsub -0.0 idiom with an fneg instruction. We didn't see to have a test that showed the current codegen. Just some tests for constant folding and a test that was only

[PATCH] D71903: [Coroutines][6/6] Clang schedules new passes

2019-12-30 Thread Wenlei He via Phabricator via cfe-commits
wenlei added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1228 + MPM.addPass(createModuleToFunctionPassAdaptor(CoroElidePass())); + MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(CoroSplitPass())); +

[PATCH] D70290: [OpenMP] Use the OpenMPIRBuilder for "omp parallel"

2019-12-30 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG10fedd94b432: [OpenMP] Use the OpenMPIRBuilder for `omp parallel` (authored by jdoerfert). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70290/new/

[PATCH] D71948: [OpenMP] Use the OpenMPIRBuilder for `cancel` directives

2019-12-30 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jdoerfert marked an inline comment as done. Closed by commit rG000c6a5038bc: [OpenMP] Use the OpenMPIRBuilder for `omp cancel` (authored by jdoerfert). Changed prior to commit:

[clang] 10fedd9 - [OpenMP] Use the OpenMPIRBuilder for `omp parallel`

2019-12-30 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2019-12-30T13:57:13-06:00 New Revision: 10fedd94b4326225de4a8a1fc53594cebd501246 URL: https://github.com/llvm/llvm-project/commit/10fedd94b4326225de4a8a1fc53594cebd501246 DIFF:

[PATCH] D72010: [CodeGen] Use CreateFNeg in buildFMulAdd

2019-12-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper marked an inline comment as done. craig.topper added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3350 +MulOp0 = Builder.CreateFNeg(MulOp0, "neg"); + if (negAdd) +Addend = Builder.CreateFNeg(Addend, "neg"); I removed the

[PATCH] D72010: [CodeGen] Use CreateFNeg in buildFMulAdd

2019-12-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: cameron.mcinally, rjmccall, efriedma, rsmith. We have an fneg instruction now and should use it instead of the fsub -0.0 idiom. Looks like we had no test that showed that we handled the negation cases here so I've added new

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4a7aa252a32a: [X86][AsmParser] re-introduce offset operator (authored by epastor). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71436/new/

[clang] 4a7aa25 - [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via cfe-commits
Author: Eric Astor Date: 2019-12-30T14:35:26-05:00 New Revision: 4a7aa252a32a94b1bb61b3dc7f027b4a27ae334f URL: https://github.com/llvm/llvm-project/commit/4a7aa252a32a94b1bb61b3dc7f027b4a27ae334f DIFF: https://github.com/llvm/llvm-project/commit/4a7aa252a32a94b1bb61b3dc7f027b4a27ae334f.diff

[PATCH] D71991: Fix external-names.c test when separator is \\

2019-12-30 Thread Adrian McCarthy via Phabricator via cfe-commits
amccarth accepted this revision. amccarth added a comment. I've made a similar change in several other tests, but this test works for me without this change. I'm trying to understand why, but I don't see any harm in landing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D71939: clang-format: fix conflict between FormatStyle::BWACS_MultiLine and BeforeCatch/BeforeElse

2019-12-30 Thread Pavlo Shkrabliuk via Phabricator via cfe-commits
pastey marked an inline comment as done. pastey added a comment. @MyDeveloperDay, thanks for looking into this. Added a comment Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71939/new/ https://reviews.llvm.org/D71939

[PATCH] D71939: clang-format: fix conflict between FormatStyle::BWACS_MultiLine and BeforeCatch/BeforeElse

2019-12-30 Thread Pavlo Shkrabliuk via Phabricator via cfe-commits
pastey updated this revision to Diff 235621. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71939/new/ https://reviews.llvm.org/D71939 Files: clang/lib/Format/UnwrappedLineFormatter.cpp clang/unittests/Format/FormatTest.cpp Index:

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61144 tests passed, 0 failed and 728 were skipped. {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings

[PATCH] D71969: [OpenMP] diagnose zero-length array section in the depend clause

2019-12-30 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 added a comment. In D71969#1798224 , @jdoerfert wrote: > Is there a reason not to put this check right next to the one that issues > `err_omp_section_length_negative`. SemaExpr.cpp +4668 It is a good idea to group the checking together however

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon question-circle color=gray} Unit tests: unknown. {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings . {icon times-circle color=red}

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 235620. epastor added a comment. - The three-argument version of find_if is std::find_if, and the qualification is required. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71436/new/

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61144 tests passed, 0 failed and 728 were skipped. {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 235619. epastor marked 5 inline comments as done. epastor added a comment. - Fix a few final issues. - Pack the AsmRewrite struct more optimally. - Only check if we can fuse rewrites with ones we haven't already reached! Repository: rG LLVM Github

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
epastor added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:1821 +getParser().parsePrimaryExpr(Val, End)) + return Error(Start, "unexpected token!"); + } else if (ParseIntelInlineAsmIdentifier(Val, ID, Info, false, End, true)) {

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-30 Thread Eric Astor via Phabricator via cfe-commits
epastor updated this revision to Diff 235617. epastor added a comment. Rebase on top of HEAD - Add compatibility with dc5b614fa9a1 (which changed handling for call operands in x86 assembly) - Remove another artifact of local

[PATCH] D71991: Fix external-names.c test when separator is \\

2019-12-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. lgtm, but why doesn't this show up on existing clang windows bots? For example: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13276 IIRC clang often joins paths with `/`, so maybe this separator is always `/` upstream. Do you

[PATCH] D71948: [OpenMP] Use the OpenMPIRBuilder for `cancel` directives

2019-12-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added inline comments. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:241 + // This seems to be used only once without much change of reuse, could live in + // OMPKinds.def but seems not necessary. + Value

[PATCH] D71939: clang-format: fix conflict between FormatStyle::BWACS_MultiLine and BeforeCatch/BeforeElse

2019-12-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think generally speaking this looks ok, I'm ok with the extra clause, as long as it's clear what it's doing Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:329 : 0; +} else if (I[1]->First->is(tok::l_brace) && +

[PATCH] D54395: [clang-tidy] implement utility-function to add 'const' to variables

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 235611. JonasToth added a comment. - fix brace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54395/new/ https://reviews.llvm.org/D54395 Files:

[PATCH] D54395: [clang-tidy] implement utility-function to add 'const' to variables

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 235610. JonasToth marked 14 inline comments as done. JonasToth added a comment. - create fresh branch with latest diff of the revision - fix review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D54395: [clang-tidy] implement utility-function to add 'const' to variables

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FixItHintUtils.cpp:34-41 +static bool isArrayType(QualType QT) { return isa(QT.getTypePtr()); } +static bool isReferenceType(QualType QT) { + return isa(QT.getTypePtr()); +} +static bool

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. There are many comments not marked as done. could you please do that with addressed issues? It is hard to otherwise see whats still left. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:110 +

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth abandoned this revision. JonasToth added a comment. Herald added a subscriber: whisperity. Abonding this revision in favor of: https://reviews.llvm.org/D54943 It doesn't make sense to have both open at the same time, as the const-transformation happens in its own patch and no heavy

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2019-12-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. if(num != 0) memmove is missed optimization opportunity. Such branch can be removed (if profitable). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63324/new/ https://reviews.llvm.org/D63324 ___ cfe-commits

[PATCH] D71842: Allow newlines in AST Matchers in clang-query files

2019-12-30 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/include/clang/ASTMatchers/Dynamic/Parser.h:167 static llvm::Optional - parseMatcherExpression(StringRef MatcherCode, Sema *S, - const NamedValueMap *NamedValues, - Diagnostics

[PATCH] D71969: [OpenMP] diagnose zero-length array section in the depend clause

2019-12-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15031-15033 +Length->EvaluateAsInt(Result, Context)) { + llvm::APSInt ConstLength = Result.Val.getInt(); + if (ConstLength.getSExtValue() == 0) { Just `..

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2019-12-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thinking about it more, i have some negative reservations about this :/ As it can be seen form https://godbolt.org/z/3BZmCM, it seems any and every(?) alternative C++ algorithm replacement is a performance pessimization in the general case, because `memcpy`

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-30 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal marked an inline comment as done. vingeldal added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:110 + "making it const") + << MemberVariable; // FIXME: Add fix-it hint to

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-30 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal updated this revision to Diff 235600. vingeldal marked 2 inline comments as done. vingeldal added a comment. Updating D70265 : [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines - Fixed code example in documentation to make it valid code. -

[PATCH] D61989: [clang-tidy] enable modernize-concat-nested-namespaces on header files

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Sorry for not responding to the review. I was very busy with other things and overlooked the mails :( Comment at: clang-tools-extra/clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:82 ast_matchers::MatchFinder *Finder) { - if

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Herald added subscribers: wuzish, whisperity. You need tests for this check. Please harden them against macro-interference as well. I think the transformation should happen as function call that return `Optional` and if any failure happens the diagnostic can still be

[PATCH] D65912: [clang-tidy] Add new check for math constants

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Herald added a subscriber: whisperity. In D65912#1623375 , @ZaMaZaN4iK wrote: > > ... then I have a script that runs clang-tidy over all the compilation > > units in a compilation database > > Can you share this script please?

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:110 + "making it const") + << MemberVariable; // FIXME: Add fix-it hint to MemberVariable +} missing

Re: [clang] 878a24e - Reapply "Fix crash on switch conditions of non-integer types in templates"

2019-12-30 Thread Alexander Kornienko via cfe-commits
Any news here? The problem is still there. On Fri, Dec 13, 2019 at 12:33 AM Andrews, Elizabeth < elizabeth.andr...@intel.com> wrote: > Hi Alexander, > > > > I am debugging this now but I assume the checks for the if condition were > skipped before this commit (therefore no crash) because ‘c’ was

[PATCH] D71963: clang-tidy doc: Add the severities description

2019-12-30 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal added a comment. @whisperity I think you misunderstood my comment. I was not trying to give a more correct description of the current definition of style-level severity in CodeChecker. I was trying to propose **new** definitions of the different severity levels that this patch

[PATCH] D71973: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp:19 + +static constexpr llvm::StringLiteral CallExprName = "call"; + I think you can remove the constant and hardcode it in the matcher. that

[PATCH] D71111: [Sema] Improve diagnostic about addr spaces for overload candidates

2019-12-30 Thread Adhemerval Zanella via Phabricator via cfe-commits
zatrazz added a comment. Hi, I am investigating a recurring regression on aarch64-linux bots and bisecting the commits on the build [1] that introduced the regression it points to this one. I don't understand exactly what is triggering the issue, but it only happen on the stage2 build with

[PATCH] D71963: clang-tidy doc: Add the severities description

2019-12-30 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D71963#1798199 , @vingeldal wrote: > - Style: things that are handled by clang-format rather than clang-tidy. This is not true, for two reasons. The shorter answer: In case it was true, the "severity category" `STYLE`

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone, ReadabilityBracesAroundStatements and ReadabilityMisleadingIndentation

2019-12-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Thank you for working on this! In D71980#1798680 , @njames93 wrote: > In D71980#1798517 , @lebedev.ri > wrote: > > > Missing tests; please upload patches with full context (`-U9`);

[PATCH] D71982: [docs] Update path to clang-tools-extra

2019-12-30 Thread Alexander Lanin via Phabricator via cfe-commits
AlexanderLanin updated this revision to Diff 235577. AlexanderLanin added a comment. Hi, I don't see the error message you mentioned anywhere, but I'm gonna assume it involves the number of surrounding lines. Here is another attempt with > git show HEAD -U99 > mypatch.patch --- Source

[PATCH] D71948: [OpenMP] Use the OpenMPIRBuilder for `cancel` directives

2019-12-30 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield accepted this revision. JonChesterfield added a comment. This revision is now accepted and ready to land. I like this, thanks. Very clear. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:241 + // This seems to be used only once without much change of

[PATCH] D71991: Fix external-names.c test when separator is \\

2019-12-30 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki accepted this revision. miyuki added a comment. This revision is now accepted and ready to land. LGTM. Let's wait for someone else to approve (or commit after holidays if no one objects). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235573. njames93 added a comment. Fixed a few more edge cases with test cases CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone, ReadabilityBracesAroundStatements and ReadabilityMisleadingIndentation

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235570. njames93 retitled this revision from "[clang-tidy] Fix bug - 44229, 33203 and 32204" to "[clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone, ReadabilityBracesAroundStatements and

[clang] 4a188fd - [OpenCL] Add mipmap builtin functions

2019-12-30 Thread Sven van Haastregt via cfe-commits
Author: Sven van Haastregt Date: 2019-12-30T10:47:58Z New Revision: 4a188fdfa79b4c1044cbb6fe0ede79583c71a56f URL: https://github.com/llvm/llvm-project/commit/4a188fdfa79b4c1044cbb6fe0ede79583c71a56f DIFF: https://github.com/llvm/llvm-project/commit/4a188fdfa79b4c1044cbb6fe0ede79583c71a56f.diff

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2019-12-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71499/new/ https://reviews.llvm.org/D71499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Adding checks to see if there are any declarations already in the ifs contained scope is really starting to bloat the code while trying to cover every edge case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846

[PATCH] D71965: include missing for std::abort

2019-12-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Do you have commit access or should we land this for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71965/new/

[PATCH] D71982: [docs] Update path to clang-tools-extra

2019-12-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. +1, please upload a diff with full context Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71982/new/ https://reviews.llvm.org/D71982

[PATCH] D71973: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2019-12-30 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze updated this revision to Diff 235564. gbencze added a comment. ReleaseNotes: move alias after new checks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71973/new/ https://reviews.llvm.org/D71973 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D71991: Fix external-names.c test when separator is \\

2019-12-30 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings created this revision. michaelplatings added reviewers: rnk, amccarth, dsanders, miyuki. Herald added a project: clang. Herald added a subscriber: cfe-commits. michaelplatings edited the summary of this revision. This fixes the following failure:

[PATCH] D71037: [Diagnostic] Add ftabstop to -Wmisleading-indentation

2019-12-30 Thread Tyker via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb47b35ff51b3: [Diagnostic] Add ftabstop to -Wmisleading-indentation (authored by Tyker). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[clang] b47b35f - [Diagnostic] Add ftabstop to -Wmisleading-indentation

2019-12-30 Thread via cfe-commits
Author: Tyker Date: 2019-12-30T09:24:34+01:00 New Revision: b47b35ff51b355a446483777155290541ab64fae URL: https://github.com/llvm/llvm-project/commit/b47b35ff51b355a446483777155290541ab64fae DIFF: https://github.com/llvm/llvm-project/commit/b47b35ff51b355a446483777155290541ab64fae.diff LOG: