[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D44883#1068400, @brooksmoses wrote: > I have noticed two things when attempting to release LLVM with this revision > internally at Google: > > 1. It's catching real bugs, all in constructors where someone wrote "member_ > = member_" when t

[PATCH] D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors"

2018-04-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone abandoned this revision. Quuxplusone added a comment. This patch's new home is https://github.com/Quuxplusone/clang/commits/aggregate-ctors — which is where I should have put it to begin with. Repository: rC Clang https://reviews.llvm.org/D44948 __

[PATCH] D45613: [X86] Introduce archs: goldmont-plus & tremont

2018-04-16 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330110: [X86] Introduce archs: goldmont-plus & tremont (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45613 Files: cfe/t

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: rsmith. Herald added a subscriber: mgrang. This is a work-in-progress attempt to add `operator<=>` rewriting. It's nowhere close to complete, but I would like some initial feedback on the direction. As currently implemented, rewritten and sy

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-16 Thread Brooks Moses via Phabricator via cfe-commits
brooksmoses added a comment. Some further statistics, now that I've done a full cleanup on our code: 8 actual bugs newly found by -Wself-assign-field. (Thank you!) 2 actual bugs newly found by -Wself-assign 6 instances of redundant code newly found by -Wself-assign 90 (approximately) instances o

[PATCH] D43578: -ftime-report switch support in Clang

2018-04-16 Thread Michael Zolotukhin via Phabricator via cfe-commits
mzolotukhin added a comment. > What kinds of would be useful to you? (How do you want the > runtime of Clang broken down?) Are vertical slices (through all Clang's > various layers and potentially parts of LLVM) -- as this patch will produce > -- useful, or would you really want horizontal sli

r330112 - Clean carriage returns from lib/ and include/. NFC.

2018-04-16 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Apr 16 01:31:08 2018 New Revision: 330112 URL: http://llvm.org/viewvc/llvm-project?rev=330112&view=rev Log: Clean carriage returns from lib/ and include/. NFC. Summary: Clean carriage returns from lib/ and include/. NFC. (I have to make this change locally in ord

[PATCH] D45591: Clean carriage returns from lib/ and include/. NFC.

2018-04-16 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330112: Clean carriage returns from lib/ and include/. NFC. (authored by malcolm.parsons, committed by ). Repository: rC Clang https://reviews.llvm.org/D45591 Files: lib/AST/ASTDumper.cpp lib/AST/

[PATCH] D43578: -ftime-report switch support in Clang

2018-04-16 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. In https://reviews.llvm.org/D43578#1067995, @rsmith wrote: > I think https://reviews.llvm.org/D45619 is a good change, and I'd like to see > that get committed. Could you give me LGTM in this case? I'm going to publish "recursive"(ovelaped) timers but I'd like to base i

[PATCH] D43578: -ftime-report switch support in Clang

2018-04-16 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. In https://reviews.llvm.org/D43578#1068417, @rsmith wrote: > I think we need to fix the overlap issue as a prerequisite to adding timers > with large amounts of overlap, especially self-overlap. Otherwise the numbers > will likely do more harm than good, as they will sign

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-16 Thread Brooks Moses via Phabricator via cfe-commits
brooksmoses added a comment. A further concern about this in the general case from the reviewer of one of my test-cleanup changes: The "var = *&var" idiom is not necessarily equivalent to "var = var" in cases of user-defined types, because operator& may be overloaded. Repository: rC Clang h

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Re false-positives - at least two [post-]reviewers need to agree on the way forward (see previous comments, mail thread), and then i will implement it. In https://reviews.llvm.org/D44883#1068576, @brooksmoses wrote: > A further concern about this in the general case

[PATCH] D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit.

2018-04-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. Thank you. Minor request and then LGTM. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2202 +// __attribute__((destructor)) in a constructor function. +addr = llvm::C

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-16 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. These kinds of improvements to warnings are awesome, but the way we are deploying them presents serious challenges to adoption which I think we need to address. I think significant new warning functionality should as a matter of course go behind some warning group at

[PATCH] D45407: [StaticAnalyzer] Added notes to the plist output

2018-04-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I just had a look with `-analyzer-config notes-as-events=true`, and it works (with CodeChecker, at least). I'd still implement a better support for notes, but this is a great workaround for now. Thanks! Repository: rC Clang https://reviews.llvm.org/D45407 _

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. There are several options: 1. @rjmccall's idea: `-wtest` (lowercase), which in this case will disable that new code in `BuildOverloadedBinOp()`. i quite like it actually. 2. split it up like i had in the first revision - ``-Wself-assign-builtin``, ``-Wself-assign-fie

[PATCH] D44381: [mips] Prevent PIC to be set to level 2

2018-04-16 Thread Aleksandar Beserminji via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330118: [mips] Prevent PIC to be set to level 2 (authored by abeserminji, committed by ). Repository: rL LLVM https://reviews.llvm.org/D44381 Files: lib/Driver/ToolChains/CommonArgs.cpp test/Drive

[PATCH] D44381: [mips] Prevent PIC to be set to level 2

2018-04-16 Thread Aleksandar Beserminji via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330118: [mips] Prevent PIC to be set to level 2 (authored by abeserminji, committed by ). Changed prior to commit: https://reviews.llvm.org/D44381?vs=142406&id=142609#toc Repository: rL LLVM https:/

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I'm guessing this implementation is super non-conforming, since expressions are evaluated during overload resolution. My plan is to keep the general shape of this patch intact, but fix the eager building of expressions with something less wasteful. Repository: rC Cla

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

2018-04-16 Thread Bart Peeters via Phabricator via cfe-commits
bartpeeters added a comment. We too would like this feature to be in the official release Repository: rL LLVM https://reviews.llvm.org/D28462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D45284: [RISCV] More validations on the input value of -march=

2018-04-16 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:50 + +static void getExtensionVersion(StringRef In, std::string &Version) { + auto I = In.begin(); You should probably document the limitation that this doesn't currently parse minor ve

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi @shuaiwang, i am currently working on the same check and we should definilty coordinate our work. :) What do you think about joining the forces and to work together on such a check? Things i would like to mention: - i differentiate between values and handles. I wa

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/utils/ASTUtils.cpp:85 + // LHS of any assignment operators. + const auto AsAssignmentLhs = binaryOperator( + anyOf(hasOperatorName("="), hasOperatorName("+="), hasOperatorName("-="), there is a `util:

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-16 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added a comment. Would be interesting to extend this checker (maybe in an upcoming patch) to report on uninitialized members not only in constructors, but also copy constructors and move constructors. See related https://bugs.llvm.org/show_bug.cgi?id=37086 This bug report also mentions

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

2018-04-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > Coming from https://reviews.llvm.org/D45679, which I should have sent out > much earlier to get in front of you :p > > Kidding aside this check is more mature than mine and I'm happy to help > incorporate mine into this one. I would love to, yours is more elegant :

[PATCH] D44568: Fix emission of phony dependency targets when adding extra deps

2018-04-16 Thread David Stenberg via Phabricator via cfe-commits
dstenb added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D44568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-16 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Not really familiar with these 2 intrinsics, I had a quick look at the ACLE: > T vget_high_ST(T 2 a); > T vget_low_ST(T 2 a); > > Gets the high, or low, half of a 128-bit vector. There are 24 intrinsics. > ARMv8 > adds 4 more intrinsics for 128-bit vectors with f

[PATCH] D45682: [analyzer] Move `TaintBugVisitor` from `GenericTaintChecker.cpp` to `BugReporterVisitors.h`.

2018-04-16 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added reviewers: NoQ, george.karpenkov, xazax.hun. Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet. `TaintBugVisitor` is a universal visitor, and many checkers rely on it, such as `ArrayBoundCheckerV2.cpp`, `DivZeroChecker.cpp` and `VLASizeChecker

r330118 - [mips] Prevent PIC to be set to level 2

2018-04-16 Thread Aleksandar Beserminji via cfe-commits
Author: abeserminji Date: Mon Apr 16 03:21:24 2018 New Revision: 330118 URL: http://llvm.org/viewvc/llvm-project?rev=330118&view=rev Log: [mips] Prevent PIC to be set to level 2 MIPS does not use PIC level 2 for historical reasons, even with -fPIC/-mxgot/multigot options. This patch prevents PIC

r330110 - [X86] Introduce archs: goldmont-plus & tremont

2018-04-16 Thread Gabor Buella via cfe-commits
Author: gbuella Date: Mon Apr 16 01:10:10 2018 New Revision: 330110 URL: http://llvm.org/viewvc/llvm-project?rev=330110&view=rev Log: [X86] Introduce archs: goldmont-plus & tremont Reviewers: craig.topper Reviewed By: craig.topper Subscribers: cfe-commits Differential Revision: https://reviews

[PATCH] D45669: [NEON] Fix the architecture condition for the crypto intrinsics

2018-04-16 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. This looks correct to me, the ACLE indeed says that: > This is only available when __ARM_ARCH >= 8 Thanks for fixing this. https://reviews.llvm.org/D45669 ___

[PATCH] D45569: [Sema] Disable built-in increment operator for bool in overload resolution in C++17

2018-04-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: SemaCXX/overloaded-builtin-operators-cxx17.cpp:8 +void foo(BoolRef br) { + // C++ [over.built]p3: Increment for bool got deprecated in C++17. + bool b = br++; // expected-error{{cannot increment value of type 'BoolRef'}} ---

[PATCH] D45670: [NEON} Define vfma_n_f32() and vfmaq_n_f32() intrinsics in AArch32 mode

2018-04-16 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: test/CodeGen/arm-neon-fma.c:27 +// CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x float> [[VECINIT_I]], float %n, i32 1 +// CHECK: [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8> +// CHECK: [[TMP1:%.*]] = bitcast <2 x float

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF planned changes to this revision. EricWF added a comment. I know how to do better. Comment at: include/clang/Sema/Overload.h:938 +/// exited. +struct RewrittenCandidateContextGuard { + RewrittenCandidateContextGuard(OverloadCandidateSet &CS)

Re: r329780 - [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-04-16 Thread Mikael Holmén via cfe-commits
Hi Adam and Artem, If I run clang-tidy -header-filter=.\* -checks=clang-analyzer-\*,-clang-analyzer-unix\*,-clang-analyzer-osx\*,-clang-analyzer-security\*,-clang-analyzer-valist\*,-clang-analyzer-optin\*,-clang-analyzer-nullability\*,-clang-analyzer-llvm.Conventions,-clang-analyzer-deadcode.De

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-04-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D45383#1068085, @compnerd wrote: > Snipping bits from `va_defs.h`: > > > #elif defined _M_ARM64 > > void __cdecl __va_start(va_list*, ...); > > #define __crt_va_start_a(ap,v) ((void)(__va_start(&ap, _ADDRESSOF(v), > _

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 142624. Szelethus added a comment. > Would be interesting to extend this checker (maybe in an upcoming patch) to > report on uninitialized members not only in constructors, but also copy > constructors and move constructors. Added 3 new test cases. to cov

[PATCH] D45685: [Sema] Add -Wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: rjmccall, aaron.ballman, dblaikie, thakis, rsmith, chandlerc, brooksmoses. Herald added a subscriber: klimek. Credit for the idea goes to @rjmccall. I'm not quite sure how to do it with `-wtest` (lowercase). so i just modelled it afte

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D44883#1068602, @lebedev.ri wrote: > There are several options: > > 1. @rjmccall's idea: `-wtest` (lowercase), which in this case will disable > that new code in `BuildOverloadedBinOp()`. i quite like it actually. > 2. split it up like i ha

[PATCH] D45685: [Sema] Add -Wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 142627. lebedev.ri added a comment. - Don't mis-spell the name of the flag. FIXME: So do we want it to be `-Wtests`, `-Wtest`, or we really want it to be `-wtest` ? Repository: rC Clang https://reviews.llvm.org/D45685 Files: docs/ReleaseNotes.rst

[PATCH] D45407: [StaticAnalyzer] Added notes to the plist output

2018-04-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. @NoQ The problem with emitting notes as events is that we lose the information that the node was a `node`. How does Xcode behave with these notes? Does it ignore them, or can read them from the command-line output of the analyser? Repository: rC Clang https://rev

[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

2018-04-16 Thread David Stenberg via Phabricator via cfe-commits
dstenb created this revision. dstenb added reviewers: klimek, sepavloff, arphaman. Herald added a subscriber: cfe-commits. In https://reviews.llvm.org/rL327851 the createUniqueFile() and createTemporaryFile() variants that do not return the file descriptors were changed to create empty files, rat

[PATCH] D45045: [DebugInfo] Generate debug information for labels.

2018-04-16 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai marked 2 inline comments as done. HsiangKai added a comment. Always add labels to DISubprogram even unreachable. Repository: rC Clang https://reviews.llvm.org/D45045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 142636. lebedev.ri retitled this revision from "[Sema] Add -Wtest global flag that silences -Wself-assign for overloaded operators." to "[Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.". lebedev.ri edited the summary of

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags

2018-04-16 Thread Alex Bradbury via Phabricator via cfe-commits
asb requested changes to this revision. asb added a comment. This revision now requires changes to proceed. Thanks Kito. -mrelax and -mno-relax currently only affect the backend. For completeness, I think this patch needs to pass the appropriate flag to the linker depending on relax/no-relax.

[PATCH] D45692: [clangd] Fix "fail to create file URI" warnings in FileIndexTest.

2018-04-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added subscribers: MaskRay, jkorous-apple, ilya-biryukov, klimek. When running the FileIndexTest, it shows "Failed to create an URI for file XXX: not a valid absolute file path" warnings, and the generated Symbols is missing Loc

[PATCH] D45643: [Failing one test] Reword [-Wreturn-type] messages to "non-void x does not return a value"

2018-04-16 Thread easyaspi314 (Devin) via Phabricator via cfe-commits
easyaspi314 added inline comments. Comment at: docs/DiagnosticsReference.rst:9097 | |++| | +--

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-04-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaOverload.cpp:839 + +unsigned OverloadCandidate::getTrueArgIndex(unsigned Idx) const { + if (getRewrittenKind() != ROC_Synthesized) I think this might be clearer if named `getParamIndexForArgIndex` or similar

[PATCH] D45643: [Failing one test] Reword [-Wreturn-type] messages to "non-void x does not return a value"

2018-04-16 Thread easyaspi314 (Devin) via Phabricator via cfe-commits
easyaspi314 added inline comments. Comment at: bindings/python/tests/cindex/test_diagnostics.py:18 self.assertEqual(tu.diagnostics[0].spelling, -'control reaches end of non-void function') +'non-void function does not return a value') --

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-16 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. ping https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-04-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45444#1068496, @shuaiwang wrote: > - I would imagine things could get messier if this check expands to also > check for turning member functions const: it's basically checking > CxxThisExpr, being a handle, is not modified within a me

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-04-16 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 142662. jdenny added a comment. Rebased onto a more recent master. https://reviews.llvm.org/D45093 Files: include/clang/AST/ASTContext.h include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp lib/Sema/Sema.cpp lib/Sema/SemaChecking.cpp lib/Sema/SemaCo

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. I don't understand the spelling of this option. You spell it `-wtest` (because rjmccall suggested that spelling); but for my money it should be spelled `-Wno-self-assign-nonfield`. Also, if you go this route, you miss the true positive reported by someone on the oth

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-16 Thread Nico Weber via cfe-commits
On Mon, Apr 16, 2018 at 5:11 AM, Roman Lebedev via Phabricator via cfe-commits wrote: > lebedev.ri added a comment. > > Re false-positives - at least two [post-]reviewers need to agree on the > way forward (see previous comments, mail thread), and then i will implement > it. > > In https://review

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45685#1068981, @Quuxplusone wrote: > I don't understand the spelling of this option. You spell it `-wtest` > (because rjmccall suggested that spelling); but for my money it should be > spelled `-Wno-self-assign-nonfield`. You did read t

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 2 inline comments as done. tejohnson added inline comments. Comment at: include/clang/Driver/Options.td:2255 HelpText<"Save intermediate compilation results.">; -def save_temps : Flag<["-", "--"], "save-temps">, Flags<[DriverOption]>, +def save_temps : Flag<["

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 142668. tejohnson marked 2 inline comments as done. tejohnson added a comment. Addressed comments Repository: rC Clang https://reviews.llvm.org/D45217 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/Back

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

2018-04-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. >> I would imagine things could get messier if this check expands to also >> check for turning member functions const: it's basically checking >> CxxThisExpr, being a handle, is not modified within a member function, but >> note there's no VarDecl for "this". > > U

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

2018-04-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D45444#1068967, @Eugene.Zelenko wrote: > In https://reviews.llvm.org/D45444#1068496, @shuaiwang wrote: > > > - I would imagine things could get messier if this check expands to also > > check for turning member functions const: it's basicall

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: include/clang/Driver/Options.td:2255 HelpText<"Save intermediate compilation results.">; -def save_temps : Flag<["-", "--"], "save-temps">, Flags<[DriverOption]>, +def save_temps : Flag<["-", "--"], "save-temps">, Flags<[CC1Option, Drive

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 2 inline comments as done. tejohnson added inline comments. Comment at: include/clang/Driver/Options.td:2255 HelpText<"Save intermediate compilation results.">; -def save_temps : Flag<["-", "--"], "save-temps">, Flags<[DriverOption]>, +def save_temps : Flag<["

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 142669. tejohnson marked 2 inline comments as done. tejohnson added a comment. Address comments Repository: rC Clang https://reviews.llvm.org/D45217 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/Backen

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: alexfh. Herald added subscribers: xazax.hun, klimek. Fix https://bugs.llvm.org/show_bug.cgi?id=34900. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45697 Files: clang-tidy/ClangTidyOptions.cpp clang-tidy/ClangTidyOptio

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a subscriber: lebedev.ri. dblaikie added a comment. I'm not sure this is a practical direction to pursue - though perhaps others disagree. It's likely non-trivial to plumb a flag through most build systems to be applied only to test code (& likely would suppress the warning in head

Re: [PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread David Blaikie via cfe-commits
I'm not sure this is a practical direction to pursue - though perhaps others disagree. It's likely non-trivial to plumb a flag through most build systems to be applied only to test code (& likely would suppress the warning in headers only included in test code - so for example, in a header-only li

r330132 - [CodeView] Initial support for emitting S_THUNK32 symbols for compiler...

2018-04-16 Thread Brock Wyma via cfe-commits
Author: bwyma Date: Mon Apr 16 09:53:57 2018 New Revision: 330132 URL: http://llvm.org/viewvc/llvm-project?rev=330132&view=rev Log: [CodeView] Initial support for emitting S_THUNK32 symbols for compiler... When emitting CodeView debug information, compiler-generated thunk routines should be emitt

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45685#1069040, @dblaikie wrote: > I'm not sure this is a practical direction to pursue - though perhaps > others disagree. > It's likely non-trivial to plumb a flag through most build systems to be > applied only to test code I'm sor

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-04-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. We can could add an exception to the "don't allow redeclarations with custom type-checking" rule to specifically allow redeclaring `__va_start`. The general rule is that we don't want user code redeclaring them because they don't have a specific signature, so our inte

Re: [PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread David Blaikie via cfe-commits
On Mon, Apr 16, 2018 at 12:08 PM Roman Lebedev via Phabricator < revi...@reviews.llvm.org> wrote: > lebedev.ri added a comment. > > In https://reviews.llvm.org/D45685#1069040, @dblaikie wrote: > > > I'm not sure this is a practical direction to pursue - though perhaps > > others disagree. > > > >

[PATCH] D45456: [Attr] Print enum attributes at correct position

2018-04-16 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 142672. jdenny edited the summary of this revision. jdenny added a comment. Rebased onto a more recent master. Added example to summary. https://reviews.llvm.org/D45456 Files: lib/AST/DeclPrinter.cpp test/Sema/ast-print.c Index: test/Sema/ast-print.c

r330150 - [Hexagon] Emit a warning when -fvectorize is given without -mhvx

2018-04-16 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Mon Apr 16 12:11:17 2018 New Revision: 330150 URL: http://llvm.org/viewvc/llvm-project?rev=330150&view=rev Log: [Hexagon] Emit a warning when -fvectorize is given without -mhvx Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td cfe/trunk/lib/Driver/Too

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-04-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D45383#1069049, @efriedma wrote: > We can could add an exception to the "don't allow redeclarations with custom > type-checking" rule to specifically allow redeclaring `__va_start`. The > general rule is that we don't want user code redec

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-04-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I don't see an `A` in `LANGBUILTIN(__va_start, "vc**.", "nt", ALL_MS_LANGUAGES)` https://reviews.llvm.org/D45383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

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

2018-04-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > You'll also need to check: > > - a member function calling another non-const member function -> *this can't > be const > - *this is passed as non-const reference param to a function -> *this can't > be const Yes. That is similar behaviour to checking if a function

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-04-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D45383#1069057, @efriedma wrote: > I don't see an `A` in `LANGBUILTIN(__va_start, "vc**.", "nt", > ALL_MS_LANGUAGES)` Ah, you're right! I was confusing it with LIBBUILTIN(va_start, "vA.", "fn", "stdarg.h", ALL_LANGUAGES) and BUILT

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-04-16 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 142673. jdenny added a comment. Rebased onto a more recent master. https://reviews.llvm.org/D45463 Files: include/clang-c/Index.h include/clang/AST/PrettyPrinter.h lib/AST/DeclPrinter.cpp lib/AST/TypePrinter.cpp test/Misc/ast-print-enum-decl.c te

r330151 - [CodeGen] Fix a crash that occurs when a non-trivial C struct with a

2018-04-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Apr 16 12:38:00 2018 New Revision: 330151 URL: http://llvm.org/viewvc/llvm-project?rev=330151&view=rev Log: [CodeGen] Fix a crash that occurs when a non-trivial C struct with a volatile array field is copied. The crash occurs because method 'visitArray' passes a null Fi

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Uuuh, the fact that phab posts the top-postings, but silently ignores inline replies is annoying. >> lebedev.ri added a comment. >> >> In https://reviews.llvm.org/D45685#1069040, @dblaikie wrote: >> >>> I'm not sure this is a practical direction to pursue - though p

r330152 - Use export_as for autolinking frameworks

2018-04-16 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Apr 16 12:42:32 2018 New Revision: 330152 URL: http://llvm.org/viewvc/llvm-project?rev=330152&view=rev Log: Use export_as for autolinking frameworks framework module SomeKitCore { ... export_as SomeKit } Given the module above, while generting autolink information dur

[PATCH] D45665: [builtin-dump-struct] printf formats generation testing

2018-04-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! Repository: rC Clang https://reviews.llvm.org/D45665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D45619: [Time-report] (1) Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature

2018-04-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Basic/FrontendTiming.cpp:18 + +bool FrontendTimesIsEnabled = false; + avt77 wrote: > efriedma wrote: > > Why is this in lib/Basic, when the declaration is in > > include/clang/Frontend/? > Because this library is b

r330153 - Revert "[CodeGen] Fix a crash that occurs when a non-trivial C struct with a"

2018-04-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Apr 16 12:53:59 2018 New Revision: 330153 URL: http://llvm.org/viewvc/llvm-project?rev=330153&view=rev Log: Revert "[CodeGen] Fix a crash that occurs when a non-trivial C struct with a" This reverts commit r330151, which caused bots to fail. Modified: cfe/trunk/lib

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-04-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 142685. erichkeane added a comment. Added the exception for MSVC's __va_start. __va_start is a normal function on Linux, so it isn't an error on non-windows either. https://reviews.llvm.org/D45383 Files: include/clang/AST/ASTContext.h include/clang

r330154 - [OPENMP] General code improvements.

2018-04-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Apr 16 13:16:21 2018 New Revision: 330154 URL: http://llvm.org/viewvc/llvm-project?rev=330154&view=rev Log: [OPENMP] General code improvements. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp cfe/trunk/lib/CodeGen/CGOpenMPRuntimeNVPTX.h cfe/trunk/tes

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-16 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 142686. devnexen added a comment. - Putting the change on the driver itself. https://reviews.llvm.org/D45662 Files: lib/Driver/ToolChains/OpenBSD.cpp Index: lib/Driver/ToolChains/OpenBSD.cpp =

r330155 - [CodeGen] Fix a crash that occurs when a non-trivial C struct with a

2018-04-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Apr 16 13:23:52 2018 New Revision: 330155 URL: http://llvm.org/viewvc/llvm-project?rev=330155&view=rev Log: [CodeGen] Fix a crash that occurs when a non-trivial C struct with a volatile array field is copied. The crash occurs because method 'visitArray' passes a null Fi

[PATCH] D45465: [AST] Fix printing tag decl groups in decl contexts

2018-04-16 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 142687. jdenny added a comment. Rebased onto a more recent master. https://reviews.llvm.org/D45465 Files: lib/AST/DeclPrinter.cpp test/Misc/ast-print-enum-decl.c test/Misc/ast-print-record-decl.c test/Sema/ast-print.c test/SemaCXX/ast-print.cpp In

r330156 - [OPENMP] Allow to use declare target variables in map clauses

2018-04-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Apr 16 13:34:41 2018 New Revision: 330156 URL: http://llvm.org/viewvc/llvm-project?rev=330156&view=rev Log: [OPENMP] Allow to use declare target variables in map clauses Global variables marked as declare target are allowed to be used in map clauses. Patch fixes the cras

[PATCH] D45698: [analyzer] When we fail to evaluate a pointer cast, escape the pointer.

2018-04-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. If a pointer cast fails (evaluates to an `UnknownVal`) and such cast is the last use of the pointer, the pointer is no longer referenced by t

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D45217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D45310: Warn about memcpy'ing non-trivial C structs

2018-04-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 142691. ahatanak marked an inline comment as done. ahatanak added a comment. Move method visitArray to the derived classes and pass the array type to the method instead of the QualType. Repository: rC Clang https://reviews.llvm.org/D45310 Files: incl

[PATCH] D45310: Warn about memcpy'ing non-trivial C structs

2018-04-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/AST/NonTrivialCStructTypeVisitor.h:30 +if (asDerived().getContext().getAsArrayType(FT)) + return asDerived().visitArray(DK, FT, std::forward(Args)...); + rjmccall wrote: > ahatanak wrote: > > rjmc

[PATCH] D45698: [analyzer] When we fail to evaluate a pointer cast, escape the pointer.

2018-04-16 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I am in favour of this is what. This is what I suggested back than in https://reviews.llvm.org/D23014 but it was somehowoverlooked. Repository: rC Clang https://reviews.llvm.org/D45698 ___ cfe-commits mailing list cfe-

[PATCH] D45699: [Availability] Improve availability to consider functions run at load time

2018-04-16 Thread Steven Wu via Phabricator via cfe-commits
steven_wu created this revision. steven_wu added a reviewer: arphaman. There are some functions/methods that run when the application launches or the library loads. Those functions will run reguardless the OS version as long as it satifies the minimum deployment target. Annotate them with availabi

r330159 - Defer adding keywords to the identifier table until after the language options have been loaded from the AST file.

2018-04-16 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Apr 16 14:07:08 2018 New Revision: 330159 URL: http://llvm.org/viewvc/llvm-project?rev=330159&view=rev Log: Defer adding keywords to the identifier table until after the language options have been loaded from the AST file. This fixes issues with "class" being repor

[PATCH] D35181: Defer addition of keywords to identifier table when loading AST

2018-04-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r330159. Thank you for the patch! https://reviews.llvm.org/D35181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-04-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. It looks like you didn't fix the tests? https://reviews.llvm.org/D45383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-04-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D34331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45698: [analyzer] When we fail to evaluate a pointer cast, escape the pointer.

2018-04-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, yeah, indeed, i must have overlooked it, nice one :) I'll see if i can fix the other place as well. Repository: rC Clang https://reviews.llvm.org/D45698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D45383: Limit types of builtins that can be redeclared.

2018-04-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 142695. erichkeane added a comment. Revert unnecessary test changes... :/ https://reviews.llvm.org/D45383 Files: include/clang/AST/ASTContext.h include/clang/Basic/Builtins.h include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ASTContext.cpp li

  1   2   >