[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @skan Does this look good to you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72463/new/ https://reviews.llvm.org/D72463 ___ cfe-commits mailing list

[PATCH] D72462: [clangd] Fix markdown rendering in VSCode

2020-01-09 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72462/new/ https://reviews.llvm.org/D72462

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2020-01-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 2 inline comments as done. ilya-biryukov added inline comments. Comment at: include/clang/Tooling/Syntax/Tokens.h:206 + /// DECL(a); + /// spelledTokens() returns {"#", "define", "DECL", "(", "name", ")", "eof"}. + /// FIXME: we do not yet store

[clang] 759c904 - [Syntax] Update comment, remove stale FIXME. NFC

2020-01-09 Thread Ilya Biryukov via cfe-commits
Author: Ilya Biryukov Date: 2020-01-10T08:15:18+01:00 New Revision: 759c90456d418ffe69e1a2b4bcea2792491a6b5a URL: https://github.com/llvm/llvm-project/commit/759c90456d418ffe69e1a2b4bcea2792491a6b5a DIFF: https://github.com/llvm/llvm-project/commit/759c90456d418ffe69e1a2b4bcea2792491a6b5a.diff

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2020-01-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 2 inline comments as done. ilya-biryukov added inline comments. Comment at: include/clang/Tooling/Syntax/Tokens.h:206 + /// DECL(a); + /// spelledTokens() returns {"#", "define", "DECL", "(", "name", ")", "eof"}. + /// FIXME: we do not yet store

[PATCH] D72355: [clangd] Assert that the testcases in FindExplicitReferencesTest.All have no diagnostics

2020-01-09 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, thanks! Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:898 class $10^Foo { - $11^Foo(int); +

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-09 Thread Kan Shengchen via Phabricator via cfe-commits
skan marked an inline comment as done and an inline comment as not done. skan added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2045 + + if (Args.hasFlag(options::OPT_mbranches_within_32B_boundaries, +

[clang-tools-extra] b38d0d5 - clang-tidy doc - remove the widths

2020-01-09 Thread Sylvestre Ledru via cfe-commits
Author: Sylvestre Ledru Date: 2020-01-10T08:11:05+01:00 New Revision: b38d0d5bdb353f8496a0fc38b9bbee419b41a321 URL: https://github.com/llvm/llvm-project/commit/b38d0d5bdb353f8496a0fc38b9bbee419b41a321 DIFF:

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-09 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 237245. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72227/new/ https://reviews.llvm.org/D72227 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/x86-malign-branch.c Index:

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-09 Thread Kan Shengchen via Phabricator via cfe-commits
skan marked an inline comment as done. skan added inline comments. Comment at: clang/include/clang/Driver/Options.td:2200 + "Control how the assembler should align branches with NOP or segment " + "override prefix. If the boundary's size is not 0, it should be

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-09 Thread Logan Smith via Phabricator via cfe-commits
logan-5 updated this revision to Diff 237244. logan-5 marked 8 inline comments as done. logan-5 added a comment. Addressed nits. Added CERT aliases. Adjusted the check to work for both C and C++, including where they differ. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71124: [RISCV] support clang driver to select cpu

2020-01-09 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen marked an inline comment as done. khchen added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:164 + +static constexpr llvm::StringLiteral ValidRV32CPUNames[] = {{"generic-rv32"}, +

[PATCH] D72222: [Driver][CodeGen] Add -fpatchable-function-entry=N[,0]

2020-01-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Some targets don't have a PC relative relocation of pointer size, e.g. `R_MIPS_PC64` (MIPS only has `R_MIPS_PC32`, which is a GNU extension, sigh

[PATCH] D72386: [ThinLTO] pass UnrollLoops/VectorizeLoop/VectorizeSLP in CGOpts down to pass builder in ltobackend

2020-01-09 Thread Wei Mi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG21a4710c67a9: [ThinLTO] Pass CodeGenOpts like UnrollLoops/VectorizeLoop/VectorizeSLP down to… (authored by wmi). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to

[PATCH] D71365: expand printf when compiling HIP to AMDGPU

2020-01-09 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: clang/test/CodeGenHIP/printf.cpp:18 +} + +// CHECK: [[BEGIN:%.*]] = call i64 @__ockl_printf_begin(i64 0) sameerds wrote: > arsenm wrote: > > This could use a lot more testcases. Can you add some half, float, and > >

[PATCH] D72405: Allow /D flags absent during PCH creation under msvc-compat

2020-01-09 Thread Zachary Henkel via Phabricator via cfe-commits
zahen added a comment. My change keeps the diagnostic so consumers can opt into the same enforcement that exists today. Furthermore, the existing fuzzy-pch.c tests show that new -D flags are allowed under a "clangier" PCH structure. None of the existing tests error on: BAR bar = 17; when

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2045 + + if (Args.hasFlag(options::OPT_mbranches_within_32B_boundaries, + options::OPT_mno_branches_within_32B_boundaries, false)) { LuoYuanke wrote: > MaskRay

[PATCH] D72459: [CMake] Support running libc++abi tests in CrossWinToARMLinux cache file

2020-01-09 Thread Vlad Vereschaka via Phabricator via cfe-commits
vvereschaka accepted this revision. vvereschaka 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/D72459/new/ https://reviews.llvm.org/D72459

[PATCH] D44352: [Concepts] Type Constraints

2020-01-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/DeclTemplate.h:1297-1300 + if (TC->hasExplicitTemplateArgs()) +for (const auto : TC->getTemplateArgsAsWritten()->arguments()) + if (ArgLoc.getArgument().containsUnexpandedParameterPack()) +

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-09 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2045 + + if (Args.hasFlag(options::OPT_mbranches_within_32B_boundaries, + options::OPT_mno_branches_within_32B_boundaries, false)) { MaskRay wrote: > skan

[PATCH] D71734: [Modules] Handle tag types and complain about bad merges in C/Objective-C mode

2020-01-09 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added inline comments. Comment at: clang/lib/Serialization/ASTReader.cpp:11007 + // Issue any pending ODR-failure diagnostics. + for (auto : RecordOdrMergeFailures) { Is this just a copy of the other loop? That's a lot of code duplication.

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It may be reasonable to provide options to expand list of problematic functions. See bugprone-suspicious-string-compare as example. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/

[PATCH] D69878: Consoldiate internal denormal flushing controls

2020-01-09 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: llvm/docs/LangRef.rst:1837 + are present, this overrides ``"denormal-fp-math"``. Not all targets + support separately setting the denormal mode per type. + arsenm wrote: > andrew.w.kaylor wrote: > > arsenm

[PATCH] D72484: [clang-tidy] Fix check for Abseil internal namespace access

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mark fixed comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72484/new/ https://reviews.llvm.org/D72484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D71467: [FPEnv] Generate constrained FP comparisons from clang

2020-01-09 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71467/new/ https://reviews.llvm.org/D71467 ___ cfe-commits mailing list

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/NotTrivialTypesLibcMemoryCallsCheck.cpp:51 +MatchFinder *Finder) { + using namespace ast_matchers::internal; + auto IsStructPointer = [](Matcher Constraint = anything(),

[clang] f041e9a - CWG2352: Allow qualification conversions during reference binding.

2020-01-09 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-01-09T18:24:06-08:00 New Revision: f041e9ad706aee7987c5299427c33424fcabbd0d URL: https://github.com/llvm/llvm-project/commit/f041e9ad706aee7987c5299427c33424fcabbd0d DIFF: https://github.com/llvm/llvm-project/commit/f041e9ad706aee7987c5299427c33424fcabbd0d.diff

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added projects: clang, clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun, mgorny. This is a very basic warning implementation of Prefer special member functions and overloaded operators to C Standard Library functions

[PATCH] D44352: [Concepts] Type Constraints

2020-01-09 Thread Saar Raz via Phabricator via cfe-commits
saar.raz added a comment. Addressed all but one comment in recent commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44352/new/ https://reviews.llvm.org/D44352 ___ cfe-commits mailing list

[PATCH] D72484: [clang-tidy] Fix check for Abseil internal namespace access

2020-01-09 Thread Gennadiy Rozental via Phabricator via cfe-commits
rogeeff updated this revision to Diff 237225. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72484/new/ https://reviews.llvm.org/D72484 Files: clang-tools-extra/clang-tidy/abseil/NoInternalDependenciesCheck.cpp

[PATCH] D69868: Allow "callbr" to return non-void values

2020-01-09 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 237224. void added a comment. The plus constraints are now at the end of the input/output/label list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69868/new/ https://reviews.llvm.org/D69868 Files:

[PATCH] D72427: [DebugInfo] Add option to clang to limit debug info that is emitted for classes.

2020-01-09 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D72427#1812954 , @akhuang wrote: > > What's the plan for this? Is it still in an experimental stage, with the > > intent to investigate the types that are no longer emitted unedr the flag & > > explain why they're missing (&

[PATCH] D69876: Allow output constraints on "asm goto"

2020-01-09 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 237223. void added a comment. Move plus constraints to after the label constraints. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69876/new/ https://reviews.llvm.org/D69876 Files:

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2020-01-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: include/clang/Tooling/Syntax/Tokens.h:206 + /// DECL(a); + /// spelledTokens() returns {"#", "define", "DECL", "(", "name", ")", "eof"}. + /// FIXME: we do not yet store tokens of directives, like #include, #define,

[clang] 2519554 - When diagnosing the lack of a viable conversion function, also list

2020-01-09 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-01-09T15:15:02-08:00 New Revision: 25195541349b1d6dfc03bf7511483110bda69b29 URL: https://github.com/llvm/llvm-project/commit/25195541349b1d6dfc03bf7511483110bda69b29 DIFF: https://github.com/llvm/llvm-project/commit/25195541349b1d6dfc03bf7511483110bda69b29.diff

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2020-01-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma 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/D71082/new/ https://reviews.llvm.org/D71082

[PATCH] D72484: [clang-tidy] Fix check for Abseil internal namespace access

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Should be change mentioned in Release Notes? Comment at: clang-tools-extra/clang-tidy/abseil/NoInternalDependenciesCheck.cpp:40 - diag(InternalDependency->getBeginLoc(), + auto loc_at_fault = +

[PATCH] D72484: Fix clang-tidy check for Abseil internal namespace access

2020-01-09 Thread Gennadiy Rozental via Phabricator via cfe-commits
rogeeff created this revision. Herald added a subscriber: mgehre. Herald added a project: clang. rogeeff added a reviewer: EricWF. This change makes following modifications: - If reference originated from macro expansion, we report location inside of the macro instead of location where macro is

[PATCH] D72414: Add new AST matchers `hasAnyCapture` and `capturesThis`

2020-01-09 Thread Reid via Phabricator via cfe-commits
rhiro marked an inline comment as done. rhiro added a comment. Thanks for the review! I regenerated the docs and switched the `this` capture case to be an override of `hasAnyCapture`. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4056 +/// matches [this](){};

[PATCH] D72355: [clangd] Assert that the testcases in FindExplicitReferencesTest.All have no diagnostics

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

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

2020-01-09 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: llvm/lib/Support/Unix/Threading.inc:273 + +int computeHostNumPhysicalThreads() { +#if defined(HAVE_SCHED_GETAFFINITY) && defined(HAVE_CPU_COUNT) rnk wrote: > I'm not sure it makes sense to say "physical threads". I think

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

2020-01-09 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 237197. aganea marked 13 inline comments as done. aganea added a comment. Herald added subscribers: lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle. Updated as suggested by @rnk. I've also removed

[PATCH] D67537: [clangd] Client-side support for inactive regions

2020-01-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added reviewers: kadircet, ilya-biryukov, sammccall. nridge added a comment. Review ping again :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67537/new/ https://reviews.llvm.org/D67537 ___

[PATCH] D72414: Add new AST matchers `hasAnyCapture` and `capturesThis`

2020-01-09 Thread Reid via Phabricator via cfe-commits
rhiro updated this revision to Diff 237195. rhiro added a comment. - Change the hasCaptureThis functionality to be an override of hasAnyCapture with cxxThisExpr argument. Also generate the documentation and update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72355: [clangd] Assert that the testcases in FindExplicitReferencesTest.All have no diagnostics

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

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

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

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

2020-01-09 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c387cbea76b: Add builtins for aligning and checking alignment of pointers and integers (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D71499?vs=236243=237190#toc

[PATCH] D69878: Consoldiate internal denormal flushing controls

2020-01-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: llvm/docs/LangRef.rst:1837 + are present, this overrides ``"denormal-fp-math"``. Not all targets + support separately setting the denormal mode per type. + andrew.w.kaylor

[clang] 8c387cb - Add builtins for aligning and checking alignment of pointers and integers

2020-01-09 Thread Alex Richardson via cfe-commits
Author: Alex Richardson Date: 2020-01-09T21:48:29Z New Revision: 8c387cbea76b169f1f8ecc7693797e96567ed896 URL: https://github.com/llvm/llvm-project/commit/8c387cbea76b169f1f8ecc7693797e96567ed896 DIFF: https://github.com/llvm/llvm-project/commit/8c387cbea76b169f1f8ecc7693797e96567ed896.diff

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

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

[PATCH] D72449: [PATCH] [llvm-ranlib] Take in consideration UTC offset for D-flag.test

2020-01-09 Thread Adhemerval Zanella via Phabricator via cfe-commits
zatrazz added a comment. In D72449#1812818 , @arichardson wrote: > I'm fine with this workaround although I'm very surprised that the test is > not working. Especially since `deterministic-archive.test` and > `replace-update.test` also set TZ to get

[PATCH] D72119: [clangd] Handle DeducedTemplateSpecializationType in TargetFinder

2020-01-09 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6a69d3c6b3da: [clangd] Handle DeducedTemplateSpecializationType in TargetFinder (authored by nridge). Changed prior to commit: https://reviews.llvm.org/D72119?vs=236653=237183#toc Repository: rG

[PATCH] D72427: [DebugInfo] Add option to clang to limit debug info that is emitted for classes.

2020-01-09 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. > What's the plan for this? Is it still in an experimental stage, with the > intent to investigate the types that are no longer emitted unedr the flag & > explain why they're missing (& either have a justification for why that's > acceptable, or work on additional

[clang-tools-extra] 6a69d3c - [clangd] Handle DeducedTemplateSpecializationType in TargetFinder

2020-01-09 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2020-01-09T16:14:11-05:00 New Revision: 6a69d3c6b3da3d4e7709d11fd52b8e5540265280 URL: https://github.com/llvm/llvm-project/commit/6a69d3c6b3da3d4e7709d11fd52b8e5540265280 DIFF: https://github.com/llvm/llvm-project/commit/6a69d3c6b3da3d4e7709d11fd52b8e5540265280.diff

[PATCH] D72421: [clang-tidy] Refresh the add_new_check.py now that we use a table + autofix

2020-01-09 Thread Sylvestre Ledru via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc348a2674b57: [clang-tidy] Refresh the add_new_check.py now that we use a table + autofix (authored by sylvestre.ledru). Changed prior to commit: https://reviews.llvm.org/D72421?vs=236924=237178#toc

[PATCH] D72449: [PATCH] [llvm-ranlib] Take in consideration UTC offset for D-flag.test

2020-01-09 Thread Adhemerval Zanella via Phabricator via cfe-commits
zatrazz added a comment. In D72449#1812130 , @arichardson wrote: > I was careful in the test to use `TZ=UTC` for all commands printing dates and > it works fine for me in UTC+1 and in the UK which is currently UTC. Does the > bot in question ignore the

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

2020-01-09 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2575 + default: +return; + case llvm::Triple::ArchType::x86: Do we need to warn (or error) here for arches that don't implement -fstack-clash-protection? Repository: rG

[PATCH] D72421: [clang-tidy] Refresh the add_new_check.py now that we use a table + autofix

2020-01-09 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru marked 5 inline comments as done. sylvestre.ledru added inline comments. Comment at: clang-tools-extra/clang-tidy/add_new_check.py:372 +f.write(' :header: "Name", "Offers fixes"\n') +f.write(' :widths: 50, 20\n\n')

[clang-tools-extra] c348a26 - [clang-tidy] Refresh the add_new_check.py now that we use a table + autofix

2020-01-09 Thread Sylvestre Ledru via cfe-commits
Author: Sylvestre Ledru Date: 2020-01-09T22:11:18+01:00 New Revision: c348a2674b5753afde6842d5a6ee75db67e3 URL: https://github.com/llvm/llvm-project/commit/c348a2674b5753afde6842d5a6ee75db67e3 DIFF:

[PATCH] D72380: [DataFlow] Factor two worklist implementations out

2020-01-09 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowWorklist.h:20 +namespace clang { +template class DataflowWorklistBase { + llvm::BitVector EnqueuedBlocks; xazax.hun wrote: > xazax.hun wrote: > > mgehre wrote: > > >

[PATCH] D72449: [PATCH] [llvm-ranlib] Take in consideration UTC offset for D-flag.test

2020-01-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I'm fine with this workaround although I'm very surprised that the test is not working. Especially since `deterministic-archive.test` and `replace-update.test` also set TZ to get reproducible output Do you have access to any of the failing bots? If so what happens

[PATCH] D69876: Allow output constraints on "asm goto"

2020-01-09 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added a comment. In D69876#1812724 , @jyknight wrote: > Reopening, since this didn't actually land yet. BTW, this review still has > the wrong contents in the latest uploaded-diff (showing llvm changes, not >

[clang] b35f5d4 - [clang] Enforce triple in mempcpy test

2020-01-09 Thread via cfe-commits
Author: serge-sans-paille Date: 2020-01-09T21:09:15+01:00 New Revision: b35f5d4914c979282010c0618a331d11a58493ac URL: https://github.com/llvm/llvm-project/commit/b35f5d4914c979282010c0618a331d11a58493ac DIFF:

[PATCH] D72417: [ms] [X86] Use "P" modifier on all branch-target operands in inline X86 assembly.

2020-01-09 Thread Eric Astor via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1c545f6dbcbb: [ms] [X86] Use P modifier on all branch-target operands in inline X86… (authored by epastor). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72304: Summary: Add OpenMP Directives (master and critical) to OMPBuilder, and use them in clang.

2020-01-09 Thread Fady Ghanim via Phabricator via cfe-commits
fghanim marked 8 inline comments as done. fghanim added a comment. So I modified the patch based on your comments. I removed all the code that I intended for llvm pass writers for now. I will look at it again later, figure something to do with the whole switch-if-cascade thing, and will

[PATCH] D72304: Summary: Add OpenMP Directives (master and critical) to OMPBuilder, and use them in clang.

2020-01-09 Thread Fady Ghanim via Phabricator via cfe-commits
fghanim updated this revision to Diff 237149. fghanim added a comment. - Adding array types to OMPKinds.def. Inlining runtime function calls generation. reformatting with clang format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72304/new/

[clang] 1c545f6 - [ms] [X86] Use "P" modifier on all branch-target operands in inline X86 assembly.

2020-01-09 Thread Eric Astor via cfe-commits
Author: Eric Astor Date: 2020-01-09T14:55:03-05:00 New Revision: 1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb URL: https://github.com/llvm/llvm-project/commit/1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb DIFF: https://github.com/llvm/llvm-project/commit/1c545f6dbcbb3ada2dfef2c6afbc1ca8939135cb.diff

[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

2020-01-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D70172#1812664 , @yaxunl wrote: > In D70172#1812631 , @rjmccall wrote: > > > Most uses of the destructor do not use the delete operator, though, and > > therefore should not trigger

[PATCH] D69876: Allow output constraints on "asm goto"

2020-01-09 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: clang/lib/AST/Stmt.cpp:646-648 + // Labels are placed after "InOut" operands. Adjust accordingly. + if (IsLabel) +N += getNumPlusOperands(); void wrote: > jyknight wrote: > > I'm confused about this

[PATCH] D69876: Allow output constraints on "asm goto"

2020-01-09 Thread James Y Knight via Phabricator via cfe-commits
jyknight reopened this revision. jyknight added a comment. This revision is now accepted and ready to land. Reopening, since this didn't actually land yet. BTW, this review still has the wrong contents in the latest uploaded-diff (showing llvm changes, not clang changes). Repository: rG

[PATCH] D72242: Fix crash on value dependent bitfields in if conditions in templates

2020-01-09 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 237132. eandrews edited the summary of this revision. eandrews added a comment. Semantic analysis for value dependent conditions is now skipped as per Erich's comment. Patch adds an argument to CheckBooleanCondition to still do the required analysis for

[PATCH] D71827: [clang] avoid strict aliasing violation in assert

2020-01-09 Thread Ryan Libby via Phabricator via cfe-commits
rlibby added a comment. I am no expert here so I will defer, but I believe those suggestions are weaker assertions. I believe it's really trying to assert that the NamedDecl type is the first template type in the point union, and is represented by a 0 bit in the addr, and that the pointer was

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-01-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 237136. JonasToth added a comment. - Merge branch 'master' into feature_transform_const.patch - actually dismiss function references - work on exclusion of variables that have type, autotype or reference-type to template parameter - by default analyze the

[PATCH] D72449: [PATCH] [llvm-ranlib] Take in consideration UTC offset for D-flag.test

2020-01-09 Thread Adhemerval Zanella via Phabricator via cfe-commits
zatrazz updated this revision to Diff 237134. zatrazz added a comment. Updated patch based on previous comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72449/new/ https://reviews.llvm.org/D72449 Files: llvm/test/tools/llvm-ranlib/D-flag.test Index:

[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

2020-01-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D70172#1812631 , @rjmccall wrote: > Most uses of the destructor do not use the delete operator, though, and > therefore should not trigger the diagnostics in `f` to be emitted. And this > really doesn't require a

[PATCH] D72449: [PATCH] [llvm-ranlib] Take in consideration UTC offset for D-flag.test

2020-01-09 Thread Adhemerval Zanella via Phabricator via cfe-commits
zatrazz marked 2 inline comments as done. zatrazz added inline comments. Comment at: llvm/test/tools/llvm-ranlib/D-flag.test:13 # RUN: cp %t-no-index.a %t.a && llvm-ranlib -D %t.a -# RUN: env TZ=UTC llvm-ar tv %t.a | FileCheck %s --check-prefix=DETERMINISTIC-VALUES +# RUN:

Re: [clang] 24ab9b5 - Generalize the pass registration mechanism used by Polly to any third-party tool

2020-01-09 Thread Michael Kruse via cfe-commits
Am Mi., 8. Jan. 2020 um 17:20 Uhr schrieb Eric Christopher : > > > > On Wed, Jan 8, 2020 at 3:07 PM Michael Kruse > wrote: >> >> Am Di., 7. Jan. 2020 um 18:57 Uhr schrieb Eric Christopher via >> cfe-commits : >> >> Is there anything I should have done? Probably reaching llvm-dev before >> >>

[PATCH] D71827: [clang] avoid strict aliasing violation in assert

2020-01-09 Thread Dimitry Andric via Phabricator via cfe-commits
dim added inline comments. Comment at: clang/include/clang/AST/DeclContextInternals.h:102 // at getLookupResult. -assert(*(NamedDecl **) == ND && +assert(Data.getAddrOfPtr1() && *Data.getAddrOfPtr1() == ND && "PointerUnion mangles the NamedDecl

[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

2020-01-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D70172#1810665 , @rsmith wrote: > This doesn't look quite right to me. I don't think we should treat the > `delete this;` for a destructor as being emitted-for-device in any > translation unit in which the vtable is marked

[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

2020-01-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D70172#1812533 , @yaxunl wrote: > In D70172#1809571 , @rjmccall wrote: > > > I thought you were saying that the destructor decl hadn't been created yet, > > but I see now that you're

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-09 Thread Logan Smith via Phabricator via cfe-commits
logan-5 marked 2 inline comments as done. logan-5 added a comment. In D72378#1810763 , @aaron.ballman wrote: > This check is missing a whole lot of reserved identifiers. For instance, in > C++ it is missing everything from

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-09 Thread Logan Smith via Phabricator via cfe-commits
logan-5 marked an inline comment as done. logan-5 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-unintended-adl.cpp:61 +void templateFunction(T t) { + swap(t, t); + Quuxplusone wrote: > logan-5 wrote: > > Quuxplusone

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237127. njames93 added a comment. updated release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 Files:

[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

2020-01-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D70172#1809571 , @rjmccall wrote: > I thought you were saying that the destructor decl hadn't been created yet, > but I see now that you're saying something more subtle. > > `CurContext` is set to the destructor because the

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

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

[PATCH] D70172: [CUDA][HIP] Fix assertion due to dtor check on windows

2020-01-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 237122. yaxunl added a comment. Add tests for device compilation. Add a test when both vtbl and deleting dtor are emitted with diagnostic due to delete operator. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70172/new/

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to mention changes in Release Notes (in checks changes section, in alphabetical order). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 ___

[PATCH] D72427: [DebugInfo] Add option to clang to limit debug info that is emitted for classes.

2020-01-09 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. What's the plan for this? Is it still in an experimental stage, with the intent to investigate the types that are no longer emitted unedr the flag & explain why they're missing (& either have a justification for why that's acceptable, or work on additional heuristics

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Created D72463 (`-mbranches-within-32B-boundaries` can be overridden by `-malign-branch*`; added test coverage) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72227/new/ https://reviews.llvm.org/D72227

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: skan, craig.topper, LuoYuanke, annita.zhang, jyknight, reames, chandlerc, tstellar. Herald added a project: clang. Herald added a subscriber: cfe-commits. Based on D72227 . Add

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2020-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D71612#1812036 , @martong wrote: > In D71612#1790045 , @NoQ wrote: > > > I wonder if this checker will find any misuses of placement into > > `llvm::TrailingObjects`. > > > I've evaluated

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2020-01-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:91 + SVal SizeOfPlace = getExtentSizeOfPlace(C, Place, State); + const auto SizeOfTargetCI =

[PATCH] D72245: [PoC][RISCV][LTO] Pass target-abi via module flag metadata

2020-01-09 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen updated this revision to Diff 237114. khchen added a comment. remote LTO related code. this PoC include D70837 patch for generate correct code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72245/new/ https://reviews.llvm.org/D72245 Files:

[PATCH] D72271: [Clang] Handle target-specific builtins returning aggregates.

2020-01-09 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG06d07ec4a372: [Clang] Handle target-specific builtins returning aggregates. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2020-01-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:91 + SVal SizeOfPlace = getExtentSizeOfPlace(C, Place, State); + const auto SizeOfTargetCI = SizeOfTarget.getAs(); + if (!SizeOfTargetCI) xazax.hun wrote: > martong

[clang] 06d07ec - [Clang] Handle target-specific builtins returning aggregates.

2020-01-09 Thread Simon Tatham via cfe-commits
Author: Simon Tatham Date: 2020-01-09T17:28:37Z New Revision: 06d07ec4a372b55e6fb77bf0b97964bde16a3184 URL: https://github.com/llvm/llvm-project/commit/06d07ec4a372b55e6fb77bf0b97964bde16a3184 DIFF: https://github.com/llvm/llvm-project/commit/06d07ec4a372b55e6fb77bf0b97964bde16a3184.diff LOG:

[PATCH] D72458: [clangd] Adjust diagnostic range to be inside main file

2020-01-09 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61663 tests passed, 0 failed and 779 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon check-circle color=green} clang-format: pass. Build artifacts

[PATCH] D72458: [clangd] Adjust diagnostic range to be inside main file

2020-01-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237105. kadircet marked an inline comment as done. kadircet added a comment. - Use find_if instead of raw loop Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72458/new/ https://reviews.llvm.org/D72458 Files:

[PATCH] D72462: [clangd] Fix markdown rendering in VSCode

2020-01-09 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61662 tests passed, 0 failed and 779 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon check-circle color=green} clang-format: pass. Build artifacts

[PATCH] D72458: [clangd] Adjust diagnostic range to be inside main file

2020-01-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG189aa5b7a458: [clangd] Adjust diagnostic range to be inside main file (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72458/new/

  1   2   3   >