[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-11-16 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. > The "moved-from" terminology we adopt here still feels a bit weird to me, but > i don't have a better suggestion, so i just removed the single-quotes so that > to at least feel proud about what we have. I am personally fine with this terminology, this checker corresponds

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: ahatanak. rjmccall added inline comments. Comment at: include/clang/AST/DeclCXX.h:482 +/// and a defaulted destructor. +unsigned IsNaturallyTriviallyRelocatable : 1; + Quuxplusone wrote: > erichkeane wrote: > > Quuxplusone wrote

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/clang/AST/DeclCXX.h:482 +/// and a defaulted destructor. +unsigned IsNaturallyTriviallyRelocatable : 1; + erichkeane wrote: > Quuxplusone wrote: > > erichkeane wrote: > > > Typically we'd have this ca

[PATCH] D54047: Check TUScope is valid before use

2018-11-16 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added subscribers: zturner, kimgr. kimgr added a comment. Here's some related suggestions/questions for context: - Earlier patch from @zturner with a minimal repro case: https://reviews.llvm.org/D31697. I don't think this is reproducible with Clang proper. - Open question for alternative

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 174498. Quuxplusone marked 14 inline comments as done. Quuxplusone edited the summary of this revision. Quuxplusone added a comment. Use `[[clang::trivially_relocatable]]` instead of `[[trivially_relocatable]]`. Canonicalize in `QualType::isTriviallyReloca

r347133 - Fix unused variable warning.

2018-11-16 Thread David L. Jones via cfe-commits
Author: dlj Date: Fri Nov 16 20:48:54 2018 New Revision: 347133 URL: http://llvm.org/viewvc/llvm-project?rev=347133&view=rev Log: Fix unused variable warning. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp URL: http://llvm.o

[PATCH] D51531: [analyzer][UninitializedObjectChecker] Uninit regions are only reported once

2018-11-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Herald added subscribers: gamesh411, baloghadamsoftware. In https://reviews.llvm.org/D51531#1296256, @NoQ wrote: > In https://reviews.llvm.org/D51531#1286110, @Szelethus wrote: > > > Oh, and the reason why I think it would add a lot of complication: since > > only `Exp

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 174495. Szelethus retitled this revision from "[analyzer] Emit a warning for unknown -analyzer-config options" to "[analyzer] Emit an error for invalid -analyzer-config inputs". Szelethus set the repository for this revision to rC Clang. Szelethus added a c

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D53157#1301782, @cameron.mcinally wrote: > Fair enough. Just for conversation's sake, I was envisioning the FE support a > little differently... > > 1. Add a command line option, say `-ffpe_safe=[true|false]`, that toggles > FPEnv-safe code g

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D53157#1301991, @hfinkel wrote: > In https://reviews.llvm.org/D53157#1291977, @andrew.w.kaylor wrote: > > > Craig Topper also raised some concerns with me (in person, his desk is > > right by mine) about the potential effect this might have on

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > Just because FENV_ACCESS can be toggled on that granularity doesn't mean we > have to represent it that way. We've previously agreed (I think) that if > FENV_ACCESS is enabled anywhere in a function we will want to use the > constrained intrinsics for all FP operation

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D53157#1291977, @andrew.w.kaylor wrote: > Craig Topper also raised some concerns with me (in person, his desk is right > by mine) about the potential effect this might have on code size. He tells me > that IRBuilder calls are intended to alwa

[PATCH] D54654: Correct CreateAlignmentAssumption to check sign and power-of-2 (Clang Part)

2018-11-16 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > As discussed on IRC, check sign/power of 2 correctly for the alignment > assumptions. "As discussed on IRC" is not appropriate for a commit message. The rationale must be documented here. > I hope that extra is-power-of-two won't confuse the optimizer. Probably woul

[PATCH] D54379: Add Hurd toolchain support to Clang

2018-11-16 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. As discussed in `#hurd`, a few additional comments. The Hurd codepath should first check if the triple is eligible, ie. minimizing any cost to the driver invocation for most targets, which are not going to be Hurd. In fact I would wrap it in `LLVM_UNLIKELY` but that's

[PATCH] D54379: Add Hurd toolchain support to Clang

2018-11-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Driver/ToolChains/Hurd.cpp:84 + const Driver &D = getDriver(); + std::string SysRoot = computeSysRoot(); + kristina wrote: > Move semantics? Or is this guaranteed elision (I'm not sure)? If you're talking about th

[PATCH] D51575: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜

2018-11-16 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347132: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C… (authored by stephanemoore, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-16 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. @aaron.ballman I don't actually have the commit bit, can you commit this, or are we waiting for further review? https://reviews.llvm.org/D54246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D54425: [AArch64] Add aarch64_vector_pcs function attribute to Clang

2018-11-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:1101 case CC_AAPCS: + case CC_AArch64VectorCall: return llvm::dwarf::DW_CC_LLVM_AAPCS; rnk wrote: > sdesmalen wrote: > > I wasn't really sure whether this requires a corresponding >

[PATCH] D52440: Emit lifetime markers for temporary function parameter aggregates

2018-11-16 Thread Ian Tessier via Phabricator via cfe-commits
itessier added a comment. Thanks for the detailed info! I will try to get something out when I get some free cycles. Repository: rC Clang https://reviews.llvm.org/D52440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[clang-tools-extra] r347119 - [clangd] Fix crash hovering on non-decltype trailing return

2018-11-16 Thread Marc-Andre Laperle via cfe-commits
Author: malaperle Date: Fri Nov 16 16:41:14 2018 New Revision: 347119 URL: http://llvm.org/viewvc/llvm-project?rev=347119&view=rev Log: [clangd] Fix crash hovering on non-decltype trailing return Summary: More specifically, hovering on "auto" in auto main() -> int { return 0; } Signed-off-by

[PATCH] D54553: [clangd] Fix crash hovering on non-decltype trailing return

2018-11-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Thanks for the review! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54553: [clangd] Fix crash hovering on non-decltype trailing return

2018-11-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347119: [clangd] Fix crash hovering on non-decltype trailing return (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D54

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-11-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D54563#1299918, @Szelethus wrote: > How about `std::list::splice`? Hmm, you mean that it leaves its argument empty? Interesting, i guess we may need a separate facility for that. I wonder how many other state-reset methods are we forgetting.

[PATCH] D54557: [analyzer] MoveChecker Pt.2: Restrict the warning to STL objects and locals.

2018-11-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D54557#1301869, @NoQ wrote: > In https://reviews.llvm.org/D54557#1300671, @Szelethus wrote: > > > Nice catch, would you like to make an issue on their project or shall I? > > > I guess it can be an outright pull request :) I'll see if i have

[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-11-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:385-386 + } + // Provide the caller with the classification of the object + // we've obtained here accidentally, for later use. + return OK; Szelethus wrote: > Maybe move this

[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-11-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 174477. NoQ added a comment. Write down full messages in tests. When the message was updated from `'x' is moved'` to `Object 'x' is moved`, the tests were not updated because they kept passing because the former is still a sub-string of the latter. https://rev

[PATCH] D54557: [analyzer] MoveChecker Pt.2: Restrict the warning to STL objects and locals.

2018-11-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D54557#1300671, @Szelethus wrote: > Nice catch, would you like to make an issue on their project or shall I? I guess it can be an outright pull request :) I'll see if i have time for that soon, please feel free to take initiative>< In https://r

[PATCH] D54557: [analyzer] MoveChecker Pt.2: Restrict the warning to STL objects and locals.

2018-11-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 174475. NoQ added a comment. Give the rvalue reference test function a sensible name. https://reviews.llvm.org/D54557 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp test/Analysis/use-after-move.cpp Index: test/Analysis/use-after-move.cpp ==

[PATCH] D54557: [analyzer] MoveChecker Pt.2: Restrict the warning to STL objects and locals.

2018-11-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. > In https://reviews.llvm.org/D54557#1300653, @NoQ wrote: > >> In https://reviews.llvm.org/D54557#1299899, @Szelethus wrote: >> >> > I think we should either remove the non-default functionality (which >> > wouldn't be ideal), or emphasise somewhere (open projects?) th

[PATCH] D54604: Automatic variable initialization

2018-11-16 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D54604#1301807, @kcc wrote: > Would it be possible to extend test/Sema/uninit-variables.c to verify that > the new option > doesn't break -Wuninitialized? Done. Repository: rC Clang https://reviews.llvm.org/D54604 __

[PATCH] D54604: Automatic variable initialization

2018-11-16 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 174471. jfb added a comment. - Make sure uninit-variables.c doesn't break. Repository: rC Clang https://reviews.llvm.org/D54604 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/LangOptions.def include/clang/Basic

[PATCH] D54657: [clang] Add -MJJ for appending to compilation databases.

2018-11-16 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder created this revision. tmroeder added a reviewer: klimek. Herald added a subscriber: cfe-commits. Some build systems compile files more than once (e.g., Kbuild in the Linux kernel compiles with -c once and with -E once). In these cases, the -MJ flag will only record the latest compilation

[PATCH] D54604: Automatic variable initialization

2018-11-16 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. Would it be possible to extend test/Sema/uninit-variables.c to verify that the new option doesn't break -Wuninitialized? Repository: rC Clang https://reviews.llvm.org/D54604 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D54425: [AArch64] Add aarch64_vector_pcs function attribute to Clang

2018-11-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:1101 case CC_AAPCS: + case CC_AArch64VectorCall: return llvm::dwarf::DW_CC_LLVM_AAPCS; sdesmalen wrote: > I wasn't really sure whether this requires a corresponding DW_CC_LLVM_AAVPCS > r

[PATCH] D51575: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜

2018-11-16 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 174465. stephanemoore added a comment. Fixed loop condition in generateFixItHint. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51575 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/FunctionNamingCheck.cpp clang-tidy/

[PATCH] D51575: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜

2018-11-16 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:63 + bool AtWordBoundary = true; + while (Index >= NewName.size()) { +char ch = NewName[Index]; I forgot to invert this condition when I refactored the early return i

[PATCH] D53787: [Sema] Provide -fvisibility-global-new-delete-hidden option

2018-11-16 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D53787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53891: [LTO] Pass down LTOUnit codegen flag to bitcode writer

2018-11-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In https://reviews.llvm.org/D53891#1300789, @tejohnson wrote: > - Switch the default of splitting lto units to off by default, unless > compiled with CFI or -fwhole-program-vtables. Thinking ahead to when I add the index based WPD implementation, we are going to wan

r347111 - Add missing test for r347072 -gcodeview-ghash

2018-11-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Nov 16 15:17:11 2018 New Revision: 347111 URL: http://llvm.org/viewvc/llvm-project?rev=347111&view=rev Log: Add missing test for r347072 -gcodeview-ghash Added: cfe/trunk/test/Driver/gcodeview-ghash.c Added: cfe/trunk/test/Driver/gcodeview-ghash.c URL: http://llvm.org/

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-16 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added a comment. Fair enough. Just for conversation's sake, I was envisioning the FE support a little differently... 1. Add a command line option, say `-ffpe_safe=[true|false]`, that toggles FPEnv-safe code generation for a whole file. A `-ffpe_safe=true` would be equivalent t

[PATCH] D54654: Correct CreateAlignmentAssumption to check sign and power-of-2 (Clang Part)

2018-11-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. LG. I hope that extra is-power-of-two won't confuse the optimizer. Repository: rC Clang https://reviews.llvm.org/D54654 ___ cfe-commit

[PATCH] D54655: [CMake] Use lld and llvm-objcopy for first stage compiler in Fuchsia

2018-11-16 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347108: [CMake] Use lld and llvm-objcopy for first stage compiler in Fuchsia (authored by phosek, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.o

r347108 - [CMake] Use lld and llvm-objcopy for first stage compiler in Fuchsia

2018-11-16 Thread Petr Hosek via cfe-commits
Author: phosek Date: Fri Nov 16 15:07:03 2018 New Revision: 347108 URL: http://llvm.org/viewvc/llvm-project?rev=347108&view=rev Log: [CMake] Use lld and llvm-objcopy for first stage compiler in Fuchsia When cross-compiling the second stage to a different target, we need to make sure that the firs

[PATCH] D54655: [CMake] Use lld and llvm-objcopy for first stage compiler in Fuchsia

2018-11-16 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: juliehockett, mcgrathr, jakehehrlich. Herald added subscribers: cfe-commits, mgorny. Herald added a reviewer: alexshap. When cross-compiling the second stage to a different target, we need to make sure that the first-stage compiler can produce

[PATCH] D54654: Correct CreateAlignmentAssumption to check sign and power-of-2 (Clang Part)

2018-11-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Repository: rC Clang https://reviews.llvm.org/D54654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54654: Correct CreateAlignmentAssumption to check sign and power-of-2 (Clang Part)

2018-11-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: jyknight, craig.topper, lebedev.ri. As discussed on IRC, check sign/power of 2 correctly for the alignment assumptions. Repository: rC Clang https://reviews.llvm.org/D54654 Files: lib/CodeGen/CGCall.cpp lib/CodeGen/CodeGenFunc

[PATCH] D54589: [clang][UBSan] Sanitization for alignment assumptions.

2018-11-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 174451. lebedev.ri added a comment. Adapt to https://reviews.llvm.org/D54588 no longer providing the actual pointer. The handled itself will have to deal with subtracting the offset. Repository: rC Clang https://reviews.llvm.org/D54589 Files: docs/R

[PATCH] D54565: Introduce `-Wc++14-compat-ctad` as a subgroup of `-Wc++14-compat`

2018-11-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 174449. Quuxplusone added a comment. Added a test case (partly copied from `test/SemaCXX/cxx14-compat.cpp`). On the last warning in the file, I omitted the sketchy part of the warning, which on Godbolt looks like this: https://godbolt.org/z/CB4z99 :7:

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-16 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment. In https://reviews.llvm.org/D54349#1301663, @aaron.ballman wrote: > I think this check is in good shape for the initial commit. Additional > functionality can be added incrementally. OK, thanks. I'll lcommit this once https://reviews.llvm.org/D54450 is committed. htt

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I think this check is in good shape for the initial commit. Additional functionality can be added incrementally. Comment at: test/clang-tidy/readability-redund

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-16 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos marked an inline comment as done. vmiklos added inline comments. Comment at: test/clang-tidy/readability-redundant-preprocessor.cpp:53 +// CHECK-NOTES: [[@LINE+1]]:2: warning: nested redundant #if; consider removing it [readability-redundant-preprocessor] +#if FOO == 3 +

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-16 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In https://reviews.llvm.org/D53157#1291978, @cameron.mcinally wrote: > In https://reviews.llvm.org/D53157#1291964, @kpn wrote: > > > I don't expect anyone would need to switch between constrained and regular > > floating point at an instruction level of granulari

[PATCH] D54641: [compiler-rt] [cmake] Fix detecting terminfo library

2018-11-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski accepted this revision. krytarowski added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D54641#1301620, @mgorny wrote: > Well, sure but I think changing the order should be done separately from > this. I'm fixing a bug resulting from people d

[PATCH] D54641: [compiler-rt] [cmake] Fix detecting terminfo library

2018-11-16 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Well, sure but I think changing the order should be done separately from this. I'm fixing a bug resulting from people deciding to customize code instead of keeping it in sync; so I'd rather not combine it with intentionally mis-syncing the code. Repository: rCRT Comp

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/readability-redundant-preprocessor.cpp:53 +// CHECK-NOTES: [[@LINE+1]]:2: warning: nested redundant #if; consider removing it [readability-redundant-preprocessor] +#if FOO == 3 + 1 +// CHECK-NOTES: [[@LINE-3]]:2: n

[PATCH] D54047: Check TUScope is valid before use

2018-11-16 Thread Tom Rix via Phabricator via cfe-commits
trixirt added a comment. Since the crash happens with the iwyu tool, a bit ago i added the testcase at the iwyu project here. https://github.com/include-what-you-use/include-what-you-use/pull/601 I don't know if it makes sense to run iwyu from clang/test. Repository: rC Clang https://review

[PATCH] D49736: [Basic] Emit warning flag suggestion only in case there's existing flag *similar* to the unknown one

2018-11-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Have you considered the same approach as typo correction? I.e. for the max allowed edit distance use percentage of the input size. For example, something similar to `TypoCorrectionConsumer::addName`

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang-tidy/abseil/DurationFactoryScaleCheck.cpp:73 + case DurationScale::Hours: +if (Multiplier <= 1.0 / 60.0) + return std::make_tu

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-16 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos marked 2 inline comments as done. vmiklos added inline comments. Comment at: clang-tidy/readability/RedundantPreprocessorCheck.cpp:37 +CheckMacroRedundancy(Loc, Condition, IfStack, + "nested redundant if; consider removing it", +

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-16 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos updated this revision to Diff 174439. https://reviews.llvm.org/D54349 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantPreprocessorCheck.cpp clang-tidy/readability/RedundantPreprocessorCheck.h docs/Rele

r347096 - [OPENMP]Fix PR39694: do not capture `this` in non-`this` region.

2018-11-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Nov 16 13:13:33 2018 New Revision: 347096 URL: http://llvm.org/viewvc/llvm-project?rev=347096&view=rev Log: [OPENMP]Fix PR39694: do not capture `this` in non-`this` region. If lambda is used inside of the OpenMP region and captures `this`, we should recapture it in the O

[PATCH] D54489: Implement -frecord-command-line (-frecord-gcc-switches)

2018-11-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: docs/ClangCommandLineReference.rst:799 +command-line. Command-lines in the section are surrounded and separated by null +bytes. Spaces and backslashes in the command-line are escaped with backslashes. +(ELF Only) How ab

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-16 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. I think this is ready to go, please advise on next steps. https://reviews.llvm.org/D54246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-16 Thread Hyrum Wright via Phabricator via cfe-commits
hwright marked 5 inline comments as done. hwright added inline comments. Comment at: clang-tidy/abseil/DurationFactoryScaleCheck.cpp:73 + case DurationScale::Hours: +if (Multiplier <= 1.0 / 60.0) + return std::make_tuple(DurationScale::Minutes, Multiplier * 60.0); -

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-11-16 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added subscribers: rsmith, shafik. shafik added a comment. Herald added a reviewer: shafik. Herald added a subscriber: gamesh411. I think these changes make sense at a high level but I am not sure about the refactoring strategy. I am especially concerned we may end up in place where all t

[PATCH] D54489: Implement -frecord-command-line (-frecord-gcc-switches)

2018-11-16 Thread Scott Linder via Phabricator via cfe-commits
scott.linder updated this revision to Diff 174429. scott.linder added a comment. Update documentation for new option and error in the driver when generating for unsupported object-file format. https://reviews.llvm.org/D54489 Files: docs/ClangCommandLineReference.rst include/clang/Driver/CC

[PATCH] D54641: [compiler-rt] [cmake] Fix detecting terminfo library

2018-11-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. As I understand it -ltinfo vs -lterminfo is mixing native curses(3) and external ncurses(3) from pkgsrc, while we prefer to use entirely our native version for all LLVM projects. Repository: rCRT Compiler Runtime https://reviews.llvm.org/D54641 __

[PATCH] D54641: [compiler-rt] [cmake] Fix detecting terminfo library

2018-11-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. Context: > Do not return -ltinfo from llvm-config --system-libs --link-static > > under NetBSD. Bump PKGREVISION > > Rust language 1.20.0 uses these options and Rust build system uses it > as '-l tinfo' and our wrapper does not handle this. https://github.com/NetB

[PATCH] D54634: [OpenCL] Fix address space deduction in template args

2018-11-16 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Makes sense. https://reviews.llvm.org/D54634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

r347081 - [OPENMP][NVPTX]Emit correct reduction code for teams/parallel

2018-11-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Nov 16 11:38:21 2018 New Revision: 347081 URL: http://llvm.org/viewvc/llvm-project?rev=347081&view=rev Log: [OPENMP][NVPTX]Emit correct reduction code for teams/parallel reductions. Fixed previously committed code for the reduction support in teams/parallel constructs ta

[PATCH] D54641: [compiler-rt] [cmake] Fix detecting terminfo library

2018-11-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. I have got a local patch in pkgsrc-wip/llvm-netbsd: $NetBSD$ --- cmake/config-ix.cmake.orig2017-12-08 18:50:04.615602612 + +++ cmake/config-ix.cmake @@ -153,7 +153,7 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memor endif() if(LLVM_ENABL

[PATCH] D53850: Declares __cpu_model as dso local

2018-11-16 Thread Haibo Huang via Phabricator via cfe-commits
hhb added a comment. Anyone can have a look at this change? Repository: rC Clang https://reviews.llvm.org/D53850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54641: [compiler-rt] [cmake] Fix detecting terminfo library

2018-11-16 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, dberris, labath. Herald added subscribers: Sanitizers, llvm-commits. Copy the fix for determining the correct terminfo library from LLVM -- use distinct variables for check_library_exists() calls. Otherwise, the first check (for -

r347075 - Revert "[PowerPC] Make no-PIC default to match GCC - CLANG"

2018-11-16 Thread Stefan Pintilie via cfe-commits
Author: stefanp Date: Fri Nov 16 11:21:33 2018 New Revision: 347075 URL: http://llvm.org/viewvc/llvm-project?rev=347075&view=rev Log: Revert "[PowerPC] Make no-PIC default to match GCC - CLANG" This reverts commit r347070 Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp cfe/trunk/test/D

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-11-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In https://reviews.llvm.org/D54630#1301283, @arphaman wrote: > I don't think we want to move the logic to add a libc++ path to the driver. My opinion is not very educated because I don't have a lot of experience/knowledge of Clang, but from my perspective it does make

[PATCH] D54547: PTH-- Remove feature entirely-

2018-11-16 Thread Vladimir Voskresensky via Phabricator via cfe-commits
voskresensky.vladimir added a comment. In https://reviews.llvm.org/D54547#1301359, @erichkeane wrote: > > I thought clang-d service is using it to speed up indexing. > > Presumably, I could also just make PTH use another bit or two for the TokenID > and it would work fine. However, when I menti

Re: [llvm-dev] mips builders on LLVM buildbot?

2018-11-16 Thread Galina Kistanova via cfe-commits
Thank you! I will remove them for now. Thanks Galina On Thu, Nov 15, 2018 at 9:21 PM Simon Atanasyan wrote: > Hi Galina, > > a) "llvm-mips-linux" buildbot is active now. There are some failed > tests but I'm working to make the buildbot "green". > > b) For now "clang-cmake-mips" and "clang-cma

[PATCH] D54547: PTH-- Remove feature entirely-

2018-11-16 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. > I thought clang-d service is using it to speed up indexing. I believe that clangd is using PCH and not PTH. (by the highly sophisticated method of grepping for pth and pch inside clangd/) https://reviews.llvm.org/D54547 __

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2018-11-16 Thread Anantha Keshava B S via Phabricator via cfe-commits
smilewithani added a comment. In https://reviews.llvm.org/D28462#1257259, @mewmew wrote: > Any update on this? There are quite a few people who got excited about this > change and would like to start using it with clang-format. Same here! Repository: rL LLVM https://reviews.llvm.org/D2846

[PATCH] D53329: Generate DIFile with main program if source is not available

2018-11-16 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Thanks @scott.linder, actually "all or nothing" is what I wanted here. We really want to get the source for these remapped files. Repository: rC Clang https://reviews.llvm.org/D53329 ___ cfe-commits mailing list cf

[PATCH] D54547: PTH-- Remove feature entirely-

2018-11-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D54547#1301351, @voskresensky.vladimir wrote: > I have some experience with PTH implementation, because had to fix it for > Java-port of Clang (https://github.com/java-port/clank). > > It was sometime ago, but making it completely workable

[PATCH] D54547: PTH-- Remove feature entirely-

2018-11-16 Thread Vladimir Voskresensky via Phabricator via cfe-commits
voskresensky.vladimir added a comment. I have some experience with PTH implementation, because had to fix it for Java-port of Clang (https://github.com/java-port/clank). It was sometime ago, but making it completely workable was not hard. As I remember the key fix was just to have PTH be EMITTED

r347072 - [codeview] Expose -gcodeview-ghash for global type hashing

2018-11-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Nov 16 10:47:41 2018 New Revision: 347072 URL: http://llvm.org/viewvc/llvm-project?rev=347072&view=rev Log: [codeview] Expose -gcodeview-ghash for global type hashing Summary: Experience has shown that the functionality is useful. It makes linking optimized clang with debug

[PATCH] D49736: [Basic] Emit warning flag suggestion only in case there's existing flag *similar* to the unknown one

2018-11-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for working on this, some minor comments: Comment at: Basic/DiagnosticIDs.cpp:612 // Two matches with the same distance, don't prefer one over the other. - Best = ""; + NearestOption = ""; } else if (Distance < BestDistance

[PATCH] D54638: [OpenMP] remove redundant MapTypeModifierSpecified flag in ParseOpenMP.cpp

2018-11-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG, add `NFC` to the title. Repository: rC Clang https://reviews.llvm.org/D54638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

r347070 - [PowerPC] Make no-PIC default to match GCC - CLANG

2018-11-16 Thread Stefan Pintilie via cfe-commits
Author: stefanp Date: Fri Nov 16 10:37:01 2018 New Revision: 347070 URL: http://llvm.org/viewvc/llvm-project?rev=347070&view=rev Log: [PowerPC] Make no-PIC default to match GCC - CLANG Make the default -fno-PIC on Power PC. Differential Revision: https://reviews.llvm.org/D53384 Modified: cf

[PATCH] D54638: OpenMP: remove redundant MapTypeModifierSpecified flag in ParseOpenMP.cpp

2018-11-16 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir created this revision. saghir added reviewers: cfe-commits, ABataev, kkwli0. saghir added a project: OpenMP. Herald added a subscriber: guansong. In the below statement in ParseOpenMP.cpp: bool IsComma = 1942 (Kind != OMPC_reduction && Kind != OMPC_task_reduction && 1943 Kind != OMPC_in_re

[PATCH] D53329: Generate DIFile with main program if source is not available

2018-11-16 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In https://reviews.llvm.org/D53329#1300435, @dblaikie wrote: > Thanks! > > So I can see where/how this fails now - the LLVM backend seems to require > that if any file has embedded source, they all do. Would you be able to/would > you mind adding a debug info verif

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-11-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I don't think we want to move the logic to add a libc++ path to the driver. `-cc1` with `-resource-dir` and `-stdlib=libc++` should still work as before. In this case the previous patch is better, except it should not set `InstalledDir` except when needed (e.g. for too

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added inline comments. This revision now requires changes to proceed. Comment at: clangd/Function.h:108 +Subscription &operator=(Subscription &&Other) { + std::tie(Parent, ListenerID) = std::tie(Other.Parent

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-narrowing-conversions-long-is-32bits.cpp:4-10 + int i;// i.e. int32_t + long l; // i.e. int32_t + long long ll; // i.e. int64_t + + unsigned int ui;// i.e. uint32_t + un

[PATCH] D54547: PTH-- Remove feature entirely-

2018-11-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D54547#1301253, @arphaman wrote: > Would it be better to deprecate the use of PTH right now for the current > release, so that the users will be aware that we will remove PTH support in > LLVM 9 once they upgrade to LLVM 8? Then we can rem

[PATCH] D54547: PTH-- Remove feature entirely-

2018-11-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Would it be better to deprecate the use of PTH right now for the current release, so that the users will be aware that we will remove PTH support in LLVM 9 once they upgrade to LLVM 8? Then we can remove it right after LLVM 8 branch is created. https://reviews.llvm.o

[PATCH] D54441: [OPENMP] Support relational-op !- (not-equal) as one of the canonical forms of random access iterator

2018-11-16 Thread Anh Tuyen Tran via Phabricator via cfe-commits
anhtuyen updated this revision to Diff 174394. anhtuyen added a comment. 1. Correct the typo on line 3707 clang/lib/Sema/SemaOpenMP.cpp 2. Update the testcase: teams_distribute_simd_loop_messages.cpp https://reviews.llvm.org/D54441 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/dist

r347064 - [AST][NFC] Pack CXXThisExpr

2018-11-16 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Nov 16 09:38:35 2018 New Revision: 347064 URL: http://llvm.org/viewvc/llvm-project?rev=347064&view=rev Log: [AST][NFC] Pack CXXThisExpr Use the newly available space in the bit-fields of Stmt. This saves 8 bytes per CXXThisExpr. Modified: cfe/trunk/include/clang

[PATCH] D53807: Create a diagnostic group for warn_call_to_pure_virtual_member_function_from_ctor_dtor, so it can be turned into an error using Werror

2018-11-16 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a reviewer: jkorous. jkorous accepted this revision. jkorous added a comment. This revision is now accepted and ready to land. LGTM. Thanks for the patch! Repository: rC Clang https://reviews.llvm.org/D53807 ___ cfe-commits mailing

r347063 - [AST][NFC] Pack CXXNullPtrLiteralExpr

2018-11-16 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Nov 16 08:56:49 2018 New Revision: 347063 URL: http://llvm.org/viewvc/llvm-project?rev=347063&view=rev Log: [AST][NFC] Pack CXXNullPtrLiteralExpr Use the newly available space in the bit-fields of Stmt. This saves one pointer per CXXNullPtrLiteralExpr. Modified:

r347062 - [AST][NFC] Pack CXXBoolLiteralExpr

2018-11-16 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Nov 16 08:54:17 2018 New Revision: 347062 URL: http://llvm.org/viewvc/llvm-project?rev=347062&view=rev Log: [AST][NFC] Pack CXXBoolLiteralExpr Use the newly available space in Stmt. This saves 8 bytes per CXXBoolLiteralExpr. Modified: cfe/trunk/include/clang/AST

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-16 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3385 + if (IsCommonSaturated) +CommonFixedSema.setSaturated(false); + ebevhan wrote: > Can EmitFixedPointConversion not determine this on its own? What I meant here was that rather

[PATCH] D54634: [OpenCL] Fix address space deduction in template args

2018-11-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, yaxunl. Don't deduce address spaces for non-pointer-like types in template args. This fixes bug reported in https://bugs.llvm.org/show_bug.cgi?id=38603 and enables most of template functionality to work correctly. There is st

  1   2   >