[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-16 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if (Args.hasArg(options:

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D45716#1069567, @dberris wrote: > In https://reviews.llvm.org/D45716#1069557, @kpw wrote: > > > My editor got a bit carried away with automatically clang-formattin

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. In https://reviews.llvm.org/D45716#1069557, @kpw wrote: > My editor got a bit carried away with automatically clang-formatting > lib/CodeGen/CodeGenFunction.cpp. I'll fix that so that I'm not messing up the > revision history. Yes please. :) Also, if you can add to t

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-16 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 142740. devnexen added a comment. - Making base gcc 4.2.1 stdc++ having profile version supported as well. https://reviews.llvm.org/D45662 Files: lib/Driver/ToolChains/OpenBSD.cpp lib/Driver/ToolChains/OpenBSD.h Index: lib/Driver/ToolChains/OpenBSD.h

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang marked an inline comment as done. shuaiwang added a comment. Hi @alexfh, @hokein, @JonasToth, I've updated this diff to be just adding the helper function `isModified()` with a set of dedicated unit tests. What do you think of the approach of getting this change committed and then @Jon

[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 Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142739. shuaiwang added a comment. Change to just add a helper function `isModified` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/ASTUtils.cpp clang-tidy/utils/ASTUtils.h unittests/clang-tidy/CMakeLis

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw added a comment. My editor got a bit carried away with automatically clang-formatting lib/CodeGen/CodeGenFunction.cpp. I'll fix that so that I'm not messing up the revision history. Repository: rC Clang https://reviews.llvm.org/D45716 ___ c

r330177 - Fix malformed table introduced by r330174

2018-04-16 Thread Duncan P. N. Exon Smith via cfe-commits
Author: dexonsmith Date: Mon Apr 16 22:48:36 2018 New Revision: 330177 URL: http://llvm.org/viewvc/llvm-project?rev=330177&view=rev Log: Fix malformed table introduced by r330174 http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/23573 Modified: cfe/trunk/docs/DiagnosticsReference.rs

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw updated this revision to Diff 142737. kpw added a comment. Added flags and bundle options. Repository: rC Clang https://reviews.llvm.org/D45716 Files: include/clang/Basic/Builtins.def include/clang/Basic/LangOptions.def include/clang/Basic/XRayInstr.h include/clang/Driver/Options

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-16 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. Okay, can you help me understand why this isn't required for builds in OpenBSD which don't use sanitizers, but want C++ builds that also add the `-pg` flag? I would have thought that those situations would break, no? https://reviews.llvm.org/D45662 _

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw added inline comments. Comment at: test/CodeGen/xray-typedevent.cpp:10 + __xray_typedevent(EventType, kPhase, 10); + // CHECK: call void @llvm.xray.typedevent(i16 {{.*}}, i8*{{.*}}, i32 10) +} FYI: It would be involved to match on more than * for the event

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris requested changes to this revision. dberris added a comment. This revision now requires changes to proceed. Thanks, Keith -- we're going to need to add this to the list of instrumentation points we can enable/disable through flags. Comment at: lib/CodeGen/CGBuiltin.cpp

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw updated this revision to Diff 142735. kpw added a comment. Adding a comment to the test to encourage getting the event types from compiler-rt Repository: rC Clang https://reviews.llvm.org/D45716 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/xray-typ

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw created this revision. kpw added reviewers: dberris, pelikan, rnk, eizan. A clang builtin for xray typed events. Differs from __xray_customevent(...) by the presence of a type tag that is vended by compiler-rt in typical usage. This allows xray handlers to expand logged events with their type

r330174 - Remove GC-related warning terminology

2018-04-16 Thread Duncan P. N. Exon Smith via cfe-commits
Author: dexonsmith Date: Mon Apr 16 21:25:18 2018 New Revision: 330174 URL: http://llvm.org/viewvc/llvm-project?rev=330174&view=rev Log: Remove GC-related warning terminology ObjC-GC isn't used any more; clean up this warning text. rdar://problem/39049693 Modified: cfe/trunk/docs/Diagnostic

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

2018-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9218-9219 +// --- F2 is a rewritten candidate ([over.match.oper]) and F1 is not. +if (Cand2.getRewrittenKind() && !Cand1.getRewrittenKind()) + return true; +if (Cand1.getRewrittenKind() && Cand2.

[PATCH] D45715: [libcxx] [test] Remove nonportable that errc::is_a_directory produces "Is a directory" from ios_base::failure tests

2018-04-16 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal updated this revision to Diff 142733. BillyONeal added a comment. Added missing include in one of the tests. https://reviews.llvm.org/D45715 Files: test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp test/std/input.output/i

[PATCH] D45715: [libcxx] [test] Remove nonportable that errc::is_a_directory produces "Is a directory" from ios_base::failure tests

2018-04-16 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal created this revision. BillyONeal added reviewers: mclow.lists, EricWF. Remove nonportable assumption in io_error tests that std::errc::is_a_directory has message "Is a directory". On MSVC++ it reports "is a directory" (with a lowercase I). https://reviews.llvm.org/D45715 Files:

[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've updated https://reviews.llvm.org/D45679 and I think the `isModified()` function there is now sufficiently covering the cases you've covered here and can be used as a good starting version if you plan to use it here. I copied your const-values test cases and it now

[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 Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142730. shuaiwang added a comment. Updated mostly `isModified()`. I'd like to mostly demonstrate that `isModified()` works given that there's https://reviews.llvm.org/D45444 and we'd like to merge. Repository: rCTE Clang Tools Extra https://reviews.llv

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

2018-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9218-9219 +// --- F2 is a rewritten candidate ([over.match.oper]) and F1 is not. +if (Cand2.getRewrittenKind() && !Cand1.getRewrittenKind()) + return true; +if (Cand1.getRewrittenKind() && Cand2.

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

2018-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9218-9219 +// --- F2 is a rewritten candidate ([over.match.oper]) and F1 is not. +if (Cand2.getRewrittenKind() && !Cand1.getRewrittenKind()) + return true; +

[PATCH] D45713: [libclang] Fix the type of 'int (Foo);'

2018-04-16 Thread strager via Phabricator via cfe-commits
strager created this revision. strager added a reviewer: cfe-commits. libclang exposes the type of 'int (Foo);' (a global variable of type int called Foo) as CXType_Unexposed. This is because Clang represents Foo's type as ParenType{BuiltinType{Int}}, and libclang does not handle ParenType. Make

[PATCH] D45712: [WIP] Diagnose invalid cv-qualifiers for friend decls.

2018-04-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added a reviewer: rsmith. WIP because I'm having trouble figuring out where to diagnose friend templates; suggestions welcome. Repository: rC Clang https://reviews.llvm.org/D45712 Files: lib/Sema/SemaDeclCXX.cpp test/CXX/class.access/class.friend

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

2018-04-16 Thread Artem Dergachev via cfe-commits
That's a combination of the simplifySVal() mechanism and the new rearrangement mechanism that causes the regression. I guess that's where we get when we try to squeeze more stuff into our solver. It seems safe to reduce simplifySVal() complexity threshold to 10 or 20 but i'm also curious whethe

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

2018-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 2 inline comments as done. EricWF added inline comments. Comment at: lib/Sema/SemaOverload.cpp:12537-12565 +/// Rewritten candidates have been added but not checked for validity. They +/// could still be non-viable if: +/// (A) The rewritten call (x <=> y) is a bui

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-16 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. I'll probably make this warning for function arguments only (when bool* is passed to a function accepting bool). Many conditionals use bool* -> bool conversion as pointed out by @Quuxplusone and @aaron.ballman https://reviews.llvm.org/D45601 _

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

2018-04-16 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 6 inline comments as done. EricWF added inline comments. Comment at: lib/Sema/SemaOverload.cpp: + bool PerformADL) { + assert(getLangOpts().CPlusPlus2a); + auto Opc = BinaryOperator::getOverloadedOpcode(Op); ---

[PATCH] D45240: [ARM] Compute a target feature which corresponds to the ARM version.

2018-04-16 Thread Eli Friedman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330169: [ARM] Compute a target feature which corresponds to the ARM version. (authored by efriedma, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

r330169 - [ARM] Compute a target feature which corresponds to the ARM version.

2018-04-16 Thread Eli Friedman via cfe-commits
Author: efriedma Date: Mon Apr 16 16:52:58 2018 New Revision: 330169 URL: http://llvm.org/viewvc/llvm-project?rev=330169&view=rev Log: [ARM] Compute a target feature which corresponds to the ARM version. Currently, the interaction between the triple, the CPU, and the supported features is a mess:

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

2018-04-16 Thread Ana Pazos via Phabricator via cfe-commits
apazos added a comment. Addressed the latest review comments. Added TODOs for validations we cannot do now. https://reviews.llvm.org/D45284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

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

2018-04-16 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 142716. apazos edited the summary of this revision. https://reviews.llvm.org/D45284 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/ToolChains/Arch/RISCV.cpp test/Driver/riscv-arch.c Index: test/Driver/riscv-arch.c ===

r330166 - [Availability] Improve availability to consider functions run at load time

2018-04-16 Thread Steven Wu via cfe-commits
Author: steven_wu Date: Mon Apr 16 16:34:18 2018 New Revision: 330166 URL: http://llvm.org/viewvc/llvm-project?rev=330166&view=rev Log: [Availability] Improve availability to consider functions run at load time Summary: There are some functions/methods that run when the application launches or th

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

2018-04-16 Thread Steven Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330166: [Availability] Improve availability to consider functions run at load time (authored by steven_wu, committed by ). Changed prior to commit: https://reviews.llvm.org/D45699?vs=142717&id=142718#to

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

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

[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 updated this revision to Diff 142717. steven_wu added a comment. Address review feedback Repository: rC Clang https://reviews.llvm.org/D45699 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaDeclObjC.cpp test/S

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

2018-04-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: lib/Sema/SemaDecl.cpp:9134-9151 + // Diagnose availability attributes. Availability cannot be used on functions + // that are ru

[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 updated this revision to Diff 142713. steven_wu added a comment. Address review feedback. Fix typos and comments. Repository: rC Clang https://reviews.llvm.org/D45699 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclAttr.cpp lib/Sema/

[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 added a comment. Thanks for reviewing Erik! Comment at: lib/Sema/SemaDecl.cpp:9134-9151 + // Diagnose availability attributes. Availability cannot be used on functions + // that are run during load/unload. + for (const auto& attr: NewFD->attrs()) { +if (!isa(at

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:63 + + This check suggests removing redundant `.data()` calls. + Eugene.Zelenko wrote: > I would suggest //Finds redundant `.data()` calls.// Same in documentation. > > Please also move to

[PATCH] D45706: [CFG] [analyzer] Add construction contexts for loop condition variables.

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. Loop condition variables (eg. `while (shared_ptr P = getIntPtr()) { ... }`) weren't handled in https://reviews.llvm.org/D42699 because they d

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please also take a look on 26817 for another idea for //.data()//. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:20 +namespace readability { +namespace { +const char kDefaultTypes[] = Please separate with empty li

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-04-16 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 142709. mikhail.ramalho added a comment. Renamed variables in the test so it doesn't match the type name https://reviews.llvm.org/D36610 Files: include/clang/AST/QualTypeNames.h lib/AST/QualTypeNames.cpp unittests/Tooling/QualTypeNamesTest.cpp

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

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. Thanks; LGTM. Repository: rC Clang https://reviews.llvm.org/D45310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

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

2018-04-16 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Steven, thanks for working on this! Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2916 + "ignoring availability attribute %select{on '+load' method|" + "with constructor attribute|with desctructor attribute}0">, + InGroup; ---

[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 142705. ahatanak marked an inline comment as done. ahatanak added a comment. Fix indentation. Repository: rC Clang https://reviews.llvm.org/D45310 Files: include/clang/AST/NonTrivialTypeVisitor.h include/clang/Basic/DiagnosticSemaKinds.td lib/Code

[PATCH] D45196: [libc++abi] Replace __sync_* functions with __libcpp_atomic_* functions.

2018-04-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma closed this revision. efriedma added a comment. https://reviews.llvm.org/rL330162 Repository: rCXXA libc++abi https://reviews.llvm.org/D45196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[libcxxabi] r330162 - [libc++abi] Replace __sync_* functions with __libcpp_atomic_* functions.

2018-04-16 Thread Eli Friedman via cfe-commits
Author: efriedma Date: Mon Apr 16 15:00:14 2018 New Revision: 330162 URL: http://llvm.org/viewvc/llvm-project?rev=330162&view=rev Log: [libc++abi] Replace __sync_* functions with __libcpp_atomic_* functions. This is basically part 2 of r313694. It's a little unfortunate that I had to copy-paste

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

2018-04-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7651 + << PointeeTy << 1); + SearchNonTrivialToCopyField::diag(PointeeTy, Dest, *this); + } else { Indentation seems messed up in these two clause

[PATCH] D45416: [analyzer] ExprEngine: model GCC inline asm rvalue cast outputs

2018-04-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. (also we'll need CFG dump tests) Repository: rC Clang https://reviews.llvm.org/D45416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-16 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang created this revision. Herald added subscribers: cfe-commits, xazax.hun, mgorny, klimek. shuaiwang added a reviewer: sbenza. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45702 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModul

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

2018-04-16 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330160: Limit types of builtins that can be redeclared. (authored by erichkeane, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45383?vs=1426

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

2018-04-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

r330160 - Limit types of builtins that can be redeclared.

2018-04-16 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Apr 16 14:30:08 2018 New Revision: 330160 URL: http://llvm.org/viewvc/llvm-project?rev=330160&view=rev Log: Limit types of builtins that can be redeclared. As reported here: https://bugs.llvm.org/show_bug.cgi?id=37033 Any usage of a builtin function that uses a va_lis

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-04-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. Mostly looks good. Comment at: unittests/Tooling/QualTypeNamesTest.cpp:225 + + TypeNameVisitor PrintingPolicy; + PrintingPolicy.ExpectedQualTypeNames["a"] = "short"; Please choose a different variable name that

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

2018-04-16 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 https://reviews.llvm.org/D45383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[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

[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] 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] 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] 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/

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] 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

[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] 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] 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] 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] 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

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] 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

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] 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 =

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] 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

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] 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

[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.

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] 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

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] 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

[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] 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] 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

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] 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

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] 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

[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

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

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

[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

[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] 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] 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 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] 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] 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] 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

  1   2   >