[PATCH] D46218: PR37275 packed attribute should not apply to base classes

2018-04-27 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. I wonder if that was originally just an oversight that got turned into official policy. Anyway, if it's the policy, it's what we have to do; LGTM. Have you checked whether we do the right

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:265-276 + const llvm::APSInt &from = i->From(), &to = i->To(); + const llvm::APSInt &newFrom = (to.isMinSignedValue() ? + BV.getMaxValue(to) : +

If I want to disable certain attributes, such as "swiftcall", is there any way to do it now?

2018-04-27 Thread ???? via cfe-commits
As the title says,thanks.___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. LGTM! Minor nitpicking in comments. Currently there's no such problem, but as `GetRange` becomes more complicated, we'll really miss the possibility of saying something like "if there's a range for negated symbol, `return GetRange(the negated symbol)`", so that all other s

[PATCH] D45451: [ItaniumMangle] Undeduced auto type doesn't belong in the substitution table

2018-04-27 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL331098: [ItaniumMangle] Undeduced auto type shouldn't be substitutable. (authored by epilk, committed by ). Herald added a

[PATCH] D45451: [ItaniumMangle] Undeduced auto type doesn't belong in the substitution table

2018-04-27 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC331098: [ItaniumMangle] Undeduced auto type shouldn't be substitutable. (authored by epilk, committed by ). Changed prior

r331098 - [ItaniumMangle] Undeduced auto type shouldn't be substitutable.

2018-04-27 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Fri Apr 27 19:40:28 2018 New Revision: 331098 URL: http://llvm.org/viewvc/llvm-project?rev=331098&view=rev Log: [ItaniumMangle] Undeduced auto type shouldn't be substitutable. We still support the old mangling if we're trying to be ABI-compatible with Clang 6.0, though. Diffe

[PATCH] D46224: [analyzer] pr37209: Fix casts of lvalues to references.

2018-04-27 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, baloghadamsoftware. In the provided test case the expression `(int *&)*(int *)p` is evaluated as follows: 1. Take an lvalue `p` of type `cha

Buildbot numbers for the week of 4/15/2018 - 4/21/2018

2018-04-27 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 4/15/2018 - 4/21/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed

Buildbot numbers for the week of 4/8/2018 - 4/14/2018

2018-04-27 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 4/8/2018 - 4/14/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to re

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Chandler Carruth via cfe-commits
On Fri, Apr 27, 2018 at 5:13 PM Richard Smith wrote: > On 27 April 2018 at 17:09, Chandler Carruth via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Fri, Apr 27, 2018 at 4:36 PM Richard Smith via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> On 27 April 2018 at 16:07, Sa

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

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/Analysis/asm.cpp:9 + ref = 1; + __asm__("" : "=r"((int)global)); // don't crash on rvalue output operand + clang_analyzer_eval(global == 1); // expected-warning{{UNKNOWN}} Ugh, do we really need to support this n

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D46190#1081773, @rsmith wrote: > No, absolutely not. This would be insanely expensive, and marks entirely > unrelated things "used". My apologies, reading this again it comes off a lot harsher than I'd intended. Repository: rC Clang http

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Richard Smith via cfe-commits
On 27 April 2018 at 17:09, Chandler Carruth via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, Apr 27, 2018 at 4:36 PM Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On 27 April 2018 at 16:07, Sanjay Patel via cfe-commits < >> cfe-commits@lists.llvm.org> wrot

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Chandler Carruth via cfe-commits
On Fri, Apr 27, 2018 at 4:36 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 27 April 2018 at 16:07, Sanjay Patel via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Missing dash corrected at r331057. I can improve the doc wording, but >> let's settle on the flag

[PATCH] D46007: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize.

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks great, thanks! I think the overall plan for any taint work would be to remove it from the program state API and move getters/setters into its own translation unit (like dynamic type propagati

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

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a subscriber: rsmith. NoQ added a comment. Woohoo LGTM. Heads up to @rsmith because we're about to break the CFG again, and also yay we've found another use case for rewriting AST in our CFG. Repository: rC Clang https://reviews.llvm.org/D45416 _

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:106 +bool isAppending, +bool canOverlap = false) const; The fact that the regular `strcpy`/`strcat` isn't checked for overlaps

[PATCH] D41627: [Modules TS] Fix namespace visibility

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclBase.cpp:285 +Decl::ModuleOwnershipKind Decl::getModuleOwnershipKindForChildOf(DeclContext *DC) { + // Ignore namespaces because they're visible by default. + while (DC && DC->isNamespace()) "because they'r

r331096 - [analyzer] CStringChecker: Add support for BSD strlcpy() and strlcat().

2018-04-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 27 16:50:55 2018 New Revision: 331096 URL: http://llvm.org/viewvc/llvm-project?rev=331096&view=rev Log: [analyzer] CStringChecker: Add support for BSD strlcpy() and strlcat(). Patch by David Carlier! Differential Revision: https://reviews.llvm.org/D45177 Modified

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-04-27 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331096: [analyzer] CStringChecker: Add support for BSD strlcpy() and strlcat(). (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D45177?vs=140667&id=144421#toc

[PATCH] D41566: [Modules TS] Diagnose exported internal linkage declarations

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclBase.h:2055-2075 +template<> +struct GraphTraits { + using NodeRef = const ::clang::Decl *; + using ChildIteratorType = ::clang::DeclContext::decl_iterator; + + static NodeRef getEntryNode(const ::clang::DeclConte

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16135 +for (Module *ImportedModule : Mod->Imports) + VisibleModules.setVisible(ImportedModule, ModuleLoc); + } For completeness, you should also call `getModuleLoader().makeModuleVisible(M

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Richard Smith via cfe-commits
On 27 April 2018 at 16:07, Sanjay Patel via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Missing dash corrected at r331057. I can improve the doc wording, but > let's settle on the flag name first, and I'll try to get it all fixed up in > one shot. > > So far we have these candidates: > 1. -

[PATCH] D46148: [CUDA] Added -f[no-]cuda-short-ptr option

2018-04-27 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 144419. tra added a subscriber: arsenm. tra added a comment. Do not use subtarget feature to control codegen of short pointers. Instead we need to add a field to TargetOptions which is the only way to pass this info to NVPTXTargetInfo constructor where we calcula

[PATCH] D46165: [Modules] Handle ObjC/C ODR-like semantics for EnumConstantDecl

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/Serialization/ASTReaderDecl.cpp:2568-2570 // ODR-based merging is only performed in C++. In C, identically-named things // in different translation

[PATCH] D46056: Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This looks right to me. Repository: rCXXA libc++abi https://reviews.llvm.org/D46056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Sanjay Patel via cfe-commits
Missing dash corrected at r331057. I can improve the doc wording, but let's settle on the flag name first, and I'll try to get it all fixed up in one shot. So far we have these candidates: 1. -ffp-cast-overflow-workaround 2. -fstrict-fp-trunc-semantics 3. -fstrict-fp-cast-overflow I don't have a

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. No, absolutely not. This would be insanely expensive, and marks entirely unrelated things "used". The right thing to do here is to consistently track both the named declaration (the

[PATCH] D46218: PR37275 packed attribute should not apply to base classes

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 144415. rsmith added a comment. Added release notes. Repository: rC Clang https://reviews.llvm.org/D46218 Files: docs/ReleaseNotes.rst lib/AST/RecordLayoutBuilder.cpp test/CodeGenCXX/alignment.cpp test/SemaCXX/class-layout.cpp Index: test/SemaCXX

[PATCH] D46218: PR37275 packed attribute should not apply to base classes

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. Clang incorrectly applies the packed attribute to base classes. Per GCC's documentation and as can be observed from its behavior, packed only applies to members, not base classes. This change is conditioned behind `-fclang-abi-com

Re: r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Richard Smith via cfe-commits
On 27 April 2018 at 09:21, Sanjay Patel via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: spatel > Date: Fri Apr 27 09:21:22 2018 > New Revision: 331056 > > URL: http://llvm.org/viewvc/llvm-project?rev=331056&view=rev > Log: > [docs] add -ffp-cast-overflow-workaround to the release no

r331093 - Fix diag-format test to not care about what cl.exe is on path

2018-04-27 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Apr 27 15:32:21 2018 New Revision: 331093 URL: http://llvm.org/viewvc/llvm-project?rev=331093&view=rev Log: Fix diag-format test to not care about what cl.exe is on path Modified: cfe/trunk/test/Misc/diag-format.c Modified: cfe/trunk/test/Misc/diag-format.c URL: http:/

r331089 - [analyzer] ObjCAutoreleaseWrite: Support a few more APIs and fix warning text.

2018-04-27 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Apr 27 15:00:51 2018 New Revision: 331089 URL: http://llvm.org/viewvc/llvm-project?rev=331089&view=rev Log: [analyzer] ObjCAutoreleaseWrite: Support a few more APIs and fix warning text. API list and improved warning text composed by Devin Coughlin. Modified: cfe/

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Am i understanding correctly that the new -enable-alpha-checks flag doesn't > enable alpha checks, but it only allows enabling them with a separate command? Yes, it enables them to be selected by clang tidy. Repository: rCTE Clang Tools Extra https://reviews.llvm.

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > I'm curious about the use case for this, since I don't think it ever makes > sense to run all the alpha checks at once. These checks are typically a work > in progress (they're not finished yet) and often have false positives that > haven't been fixed yet. We want to

[PATCH] D46148: [CUDA] Added -f[no-]cuda-short-ptr option

2018-04-27 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D46148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

r331077 - Revert r329698 (and r329702).

2018-04-27 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Apr 27 13:29:57 2018 New Revision: 331077 URL: http://llvm.org/viewvc/llvm-project?rev=331077&view=rev Log: Revert r329698 (and r329702). Speculative. ClangMoveTests started failing on http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/9958 after this change. I c

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1081559, @NoQ wrote: > Am i understanding correctly that the new `-enable-alpha-checks` flag doesn't > enable alpha checks, but it only allows enabling them with a separate command? Yes, absolutely! Same with my followup https://re

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Am i understanding correctly that the new `-enable-alpha-checks` flag doesn't enable alpha checks, but it only allows enabling them with a separate command? Also wanted to mention that developers who are interested in running analyzer alpha checkers over a compilation datab

[PATCH] D46206: [clang-tidy] Add Apple prefix acronyms to objc-property-declaration

2018-04-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: Wizard, hokein. Herald added subscribers: cfe-commits, xazax.hun, klimek. This adds a few common Apple first-party API prefixes as acronyms to `objc-property-declaration`. Here's a list showing where these come from: http://nshipste

r331069 - s/LLVM_ON_WIN32/_WIN32/, clang

2018-04-27 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Apr 27 12:11:14 2018 New Revision: 331069 URL: http://llvm.org/viewvc/llvm-project?rev=331069&view=rev Log: s/LLVM_ON_WIN32/_WIN32/, clang LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tools-extra/trunk/clangd/SourceCode.cpp:38 +// 0xxx is ASCII, handled above. 10xxx is a trailing byte, invalid here. +// 1xxx is not valid UTF-8 at all. Assert because it's probably our bug. +assert((UTF8Length

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang-tidy/ClangTidy.cpp:373-376 // FIXME: Remove this option once clang's cfg-temporary-dtors option defaults // to true. AnalyzerOptions->Config["cfg-temporary-dtors"] = Context.getOptions().AnalyzeTemporaryDtors ? "true" :

[PATCH] D46143: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-27 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331067: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D46143?vs=144357&id=144377#toc

r331067 - [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-27 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Fri Apr 27 11:51:12 2018 New Revision: 331067 URL: http://llvm.org/viewvc/llvm-project?rev=331067&view=rev Log: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier Summary: Previously, we checked tokens for `tok::identifier` to see if they were identif

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-04-27 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Henry. I had a quick look at the patch, here are some remarks. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2092 + // 'invalidateRegions()', which will remove the pair + // in CStringLength map. So calls 'InvalidateBuffer()

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-27 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Aaron, any comments for the new revision? https://reviews.llvm.org/D45932 ___ 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-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. It is agreed that it is untenable to support reentrancy for `std::function` assignment operators and I'm not trying to achieve that. Here we restrict reentrancy only to `std::function::operator=(nullptr_t)`. @mclow.lists where should the tests go if the standard specifi

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1081392, @dcoughlin wrote: > In https://reviews.llvm.org/D46159#1081371, @lebedev.ri wrote: > > > Note that it is completely off by default, and is not listed in > > documentation, `clang-tidy --help`, > > so one would have to know

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D46159#1081371, @lebedev.ri wrote: > Note that it is completely off by default, and is not listed in > documentation, `clang-tidy --help`, > so one would have to know of the existence of that hidden flag first, and > only then when that fl

r331063 - [Modules][ObjC] ASTReader should add protocols for class extensions

2018-04-27 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Fri Apr 27 11:01:23 2018 New Revision: 331063 URL: http://llvm.org/viewvc/llvm-project?rev=331063&view=rev Log: [Modules][ObjC] ASTReader should add protocols for class extensions During deserialization clang is currently missing the merging of protocols into the canonical int

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1081366, @dcoughlin wrote: > ... Note that it is completely off by default, and is not listed in documentation, `clang-tidy --help`, so one would have to know of the existence of that hidden flag first, and only then when that fla

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I'm curious about the use case for this, since I don't think it ever makes sense to run all the alpha checks at once. These checks are typically a work in progress (they're not finished yet) and often have false positives that haven't been fixed yet. Often they don't

Re: r331052 - [MC] Provide default value for IsResolved.

2018-04-27 Thread Nico Weber via cfe-commits
Nit: The comment just repeats what the line below it says. Does this have an observable effect? If so, should this have a test? On Fri, Apr 27, 2018 at 12:11 PM, Nirav Dave via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: niravd > Date: Fri Apr 27 09:11:24 2018 > New Revision: 3310

[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

2018-04-27 Thread Ross Kirsling via Phabricator via cfe-commits
rkirsling added a comment. Guidelines page has been updated (https://trac.webkit.org/changeset/231085), though it may take a bit for the website to update. Repository: rC Clang https://reviews.llvm.org/D46024 ___ cfe-commits mailing list cfe-com

[PATCH] D46143: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-27 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good, thank you. Repository: rC Clang https://reviews.llvm.org/D46143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-04-27 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc marked an inline comment as not done. russellmcc added a comment. Okay; I think I've responded to all feedback at this point. Thanks for your patience guiding me through my first contribution to this project. Let me know what else I can do to help get this merged! https://reviews.

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In https://reviews.llvm.org/D46135#1081193, @lebedev.ri wrote: > (Not everyone is always using trunk snapshots) > I'd guess it would be present for at least one release, so **I** would > expect to see that in both the clang and llvm release notes. Thanks - sounds right

r331057 - [docs] more dashes

2018-04-27 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Fri Apr 27 09:24:39 2018 New Revision: 331057 URL: http://llvm.org/viewvc/llvm-project?rev=331057&view=rev Log: [docs] more dashes Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs

r331056 - [docs] add -ffp-cast-overflow-workaround to the release notes

2018-04-27 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Fri Apr 27 09:21:22 2018 New Revision: 331056 URL: http://llvm.org/viewvc/llvm-project?rev=331056&view=rev Log: [docs] add -ffp-cast-overflow-workaround to the release notes This option was added with: D46135 rL331041 ...copying the text from UsersManual.rst for more exposure

r331055 - [MC] Undo spurious commit added into r331052.

2018-04-27 Thread Nirav Dave via cfe-commits
Author: niravd Date: Fri Apr 27 09:16:06 2018 New Revision: 331055 URL: http://llvm.org/viewvc/llvm-project?rev=331055&view=rev Log: [MC] Undo spurious commit added into r331052. Modified: cfe/trunk/tools/driver/cc1as_main.cpp Modified: cfe/trunk/tools/driver/cc1as_main.cpp URL: http://llvm

r331053 - Test commit removing trailing whitespace

2018-04-27 Thread Stuart Brady via cfe-commits
Author: stuart.brady Date: Fri Apr 27 09:11:56 2018 New Revision: 331053 URL: http://llvm.org/viewvc/llvm-project?rev=331053&view=rev Log: Test commit removing trailing whitespace Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL: http://llvm.org/viewvc

r331052 - [MC] Provide default value for IsResolved.

2018-04-27 Thread Nirav Dave via cfe-commits
Author: niravd Date: Fri Apr 27 09:11:24 2018 New Revision: 331052 URL: http://llvm.org/viewvc/llvm-project?rev=331052&view=rev Log: [MC] Provide default value for IsResolved. Modified: cfe/trunk/tools/driver/cc1as_main.cpp Modified: cfe/trunk/tools/driver/cc1as_main.cpp URL: http://llvm.or

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-04-27 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi all. I'm already here, invited by the Herald - just had no time to take a look (will change the script to add me as a reviewer). But thank you anyway! :) In the initial implementation (https://raw.githubusercontent.com/haoNoQ/clang/summary-ipa-draft/lib/AST/ASTImpo

[PATCH] D45814: Fix an assertion when -print-prog-name=

2018-04-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Do you have commit access or do you need someone to commit this on your behalf? Repository: rC Clang https://reviews.llvm.org/D45814 ___ c

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can you add a codegen test for 1.2, 2.0? Also, I am wondering whether this is valid for OpenCL C++. Do we need special handling for string literal? Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Defaul

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46135#1081165, @spatel wrote: > Should I add a bullet for this new flag/attribute to the clang release notes, > the LLVM release, both? Or do we view this as temporary and not making it to > the release? (Not everyone is always using tr

[PATCH] D46143: [clang-format/ObjC] Use getIdentifierInfo() instead of tok::identifier

2018-04-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 144357. benhamilton added a comment. Add helper canBeObjCSelectorComponent() with comments. Repository: rC Clang https://reviews.llvm.org/D46143 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/Fo

r331048 - [MC] Modify MCAsmStreamer to always build MCAssembler. NFCI.

2018-04-27 Thread Nirav Dave via cfe-commits
Author: niravd Date: Fri Apr 27 08:45:54 2018 New Revision: 331048 URL: http://llvm.org/viewvc/llvm-project?rev=331048&view=rev Log: [MC] Modify MCAsmStreamer to always build MCAssembler. NFCI. Modified: cfe/trunk/tools/driver/cc1as_main.cpp Modified: cfe/trunk/tools/driver/cc1as_main.cpp UR

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. Should I add a bullet for this new flag/attribute to the clang release notes, the LLVM release, both? Or do we view this as temporary and not making it to the release? Repository: rC Clang https://reviews.llvm.org/D46135 ___

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 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. So i suspect the history here is: https://reviews.llvm.org/D26310 added a way to filter-out these clang analyzer checks, which removed these checks from being available in clang-tidy, b

[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option

2018-04-27 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji updated this revision to Diff 144344. abeserminji marked 2 inline comments as done. abeserminji added a comment. Comments resolved. https://reviews.llvm.org/D44684 Files: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/ToolChains/Arch/Mips.cpp lib/Driver/ToolChains/Com

[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option

2018-04-27 Thread Aleksandar Beserminji via Phabricator via cfe-commits
abeserminji added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:340 + "ignoring '%0' option as it cannot be used with " + "explicit use of -mabicalls and the N64 ABI">, InGroup; sdardis wrote: > Use the %select{optionA|optionB|..|

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-04-27 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Note: The patch includes the entry points to set Objective-C and OpenMP declarations, but I do not know anything about Objective-C or OpenMP. The functions just return without updating any extra 'Used' bit. Any suggestion on how to deal with those functions

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-04-27 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso created this revision. CarlosAlbertoEnciso added reviewers: rsmith, erichkeane, probinson, dblaikie. CarlosAlbertoEnciso added a project: clang. Herald added a subscriber: aprantl. The following submission under review https://reviews.llvm.org/D44826 introduced an option to w

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + Anastasia wrote: > bader wrote: > > Anastasia wrote: > > >

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Trying to format the diff in the previous comment: --- a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -102,9 +102,14 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, } if (SkipFunctionBodies != SkipFunc

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. OK, to skip all function bodies in the preamble except for template functions and functions within a template class, I've amended the previous diff with: - a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -102,9 +102,14 @@ NamedDecl *Parse

[PATCH] D46135: [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Sanjay Patel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331041: [Driver, CodeGen] add options to enable/disable an FP cast optimization (authored by spatel, committed by ). Changed prior to commit: https://reviews.llvm.org/D46135?vs=144226&id=144342#toc Rep

r331041 - [Driver, CodeGen] add options to enable/disable an FP cast optimization

2018-04-27 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Fri Apr 27 07:22:48 2018 New Revision: 331041 URL: http://llvm.org/viewvc/llvm-project?rev=331041&view=rev Log: [Driver, CodeGen] add options to enable/disable an FP cast optimization As discussed in the post-commit thread for: rL330437 ( http://lists.llvm.org/pipermail/llvm

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + bader wrote: > Anastasia wrote: > > bader wrote: > > > As

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added inline comments. Comment at: lib/Parse/ParseCXXInlineMethods.cpp:104 - if (SkipFunctionBodies && (!FnD || Actions.canSkipFunctionBody(FnD)) && - trySkippingFunctionBody()) { + if (SkipFunctionBodies != SkipFunctionBodiesKind::None && + (!FnD || Actions.can

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-27 Thread Oliver Stannard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331039: [ARM,AArch64] Add intrinsics for dot product instructions (authored by olista01, committed by ). Changed prior to commit: https://reviews.llvm.org/D46109?vs=144081&id=144341#toc Repository: r

r331039 - [ARM,AArch64] Add intrinsics for dot product instructions

2018-04-27 Thread Oliver Stannard via cfe-commits
Author: olista01 Date: Fri Apr 27 07:03:32 2018 New Revision: 331039 URL: http://llvm.org/viewvc/llvm-project?rev=331039&view=rev Log: [ARM,AArch64] Add intrinsics for dot product instructions The ACLE spec which describes these intrinsics hasn't been published yet, but this is based on the final

[PATCH] D46109: [ARM, AArch64] Add intrinsics for dot product instructions

2018-04-27 Thread Oliver Stannard via Phabricator via cfe-commits
olista01 marked an inline comment as done. olista01 added inline comments. Comment at: test/CodeGen/arm-neon-dot-product.c:1 +// RUN: %clang_cc1 -triple armv8-linux-gnueabihf -target-cpu cortex-a57 -target-feature +dotprod \ +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt

r331038 - [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro

2018-04-27 Thread Oliver Stannard via cfe-commits
Author: olista01 Date: Fri Apr 27 06:56:02 2018 New Revision: 331038 URL: http://llvm.org/viewvc/llvm-project?rev=331038&view=rev Log: [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro This adds a pre-defined macro to test if the compiler has support for the v8.2-A dot rpoduct intrinsics in AArch

[PATCH] D46108: [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro

2018-04-27 Thread Oliver Stannard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331038: [ARM] Add __ARM_FEATURE_DOTPROD pre-defined macro (authored by olista01, committed by ). Changed prior to commit: https://reviews.llvm.org/D46108?vs=144080&id=144339#toc Repository: rC Clang

[PATCH] D44143: [clang-tidy] Create properly seeded random generator check

2018-04-27 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 updated this revision to Diff 144336. https://reviews.llvm.org/D44143 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/cert/CMakeLists.txt clang-tidy/cert/ProperlySeededRandomGeneratorCheck.cpp clang-tidy/cert/ProperlySeededRandomGeneratorCheck.h docs/ReleaseNotes.rst docs/

[PATCH] D46188: [clang-tidy] Add a flag to enable debug checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: alexfh, aaron.ballman, hokein. Herald added a subscriber: xazax.hun. After https://reviews.llvm.org/D46159 was created by @pfultz2, and i initially thought it was already possible, i had the need to view the call graph. I have almost w

[PATCH] D46187: [Analyzer] getRegisteredCheckers(): handle debug checkers too.

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: dcoughlin, alexfh, aaron.ballman, george.karpenkov, NoQ. Herald added subscribers: a.sidorin, szepet, xazax.hun. I would like to be able to trigger these debug checkers from clang-tidy, as a follow-up patch for https://reviews.llvm.or

[PATCH] D32902: [Analyzer] Iterator Checker - Part 7: Support for push and pop operations

2018-04-27 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144330. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. Rebased to Part6. Also fixed a test failing now: it is not enough to mark the symbolic expressions as live, but if it is a SymIntExpr (it can be nothing else, e

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-04-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: lib/AST/Expr.cpp:870 + if (C.getLangOpts().OpenCL && Ty.getAddressSpace() == LangAS::Default) +Ty = C.getAddrSpaceQualType(Ty, LangAS::opencl_constant); + Anastasia wrote: > bader wrote: > > As `Ty` is passed by value

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1080939, @lebedev.ri wrote: > Oh, hm. > I just needed something to view the call graph. > I have almost wrote a clang-tidy check using `analysis/CallGraph.h`, but > then i noticed/remembered that clang static analyzer has that alre

[PATCH] D45814: Fix an assertion when -print-prog-name=

2018-04-27 Thread Christian Bruel via Phabricator via cfe-commits
chrib added a comment. Hi Saleem, Thanks for your review. I have amended the patch to avoid checking the name on the common path. About your second comment, I'm not sure we have to fix -print-file-name= for an equivalent problem since in case of empty parameter, we do a concatenation with the

[PATCH] D45814: Fix an assertion when -print-prog-name=

2018-04-27 Thread Christian Bruel via Phabricator via cfe-commits
chrib updated this revision to Diff 144322. chrib added a comment. Move the non-null name check out of GetProgramPath and add a test case. Assume that we trust the callers to check for non null ProgramName. Repository: rC Clang https://reviews.llvm.org/D45814 Files: lib/Driver/Driver.cpp

[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-04-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. the patch LG and fixes the problem of llvm namespace not showing up in completions from the static index. Let's add some tests and ship it! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46183 ___ cfe

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-04-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Oh, hm. I just needed something to view the call graph. I have almost wrote a clang-tidy check using `analysis/CallGraph.h`, but then i noticed/remembered that clang static analyzer has that already. But `$ clang-tidy -checks=* -list-checks | grep -i analyzer | grep -i

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked 7 inline comments as done. ioeric added a comment. Thanks for reviewing this! In https://reviews.llvm.org/D46180#1080822, @ilya-biryukov wrote: > This change LG as an extraction of the helper functionality to be reused in > clang, clang-tidy, etc. > However, I feel there are pote

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-04-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 144319. ioeric marked 2 inline comments as done. ioeric added a comment. Addressed review comments. Repository: rC Clang https://reviews.llvm.org/D46180 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest

  1   2   >