Re: Preventing several replacements on a macro call.

2015-09-10 Thread Ted Kremenek via cfe-commits
+ Argyrios Hi Angel, I believe Argyrios is the original author of the code in question, as this looks related to the Objective-C “modernizer” migrator he wrote a while back. This code started life on our internal development branch at Apple related to an Xcode feature we were doing, and I did

Re: [PATCH] D1623: Support __builtin_ms_va_list.

2015-09-10 Thread Charles Davis via cfe-commits
cdavis5x updated this revision to Diff 34415. cdavis5x added a comment. - Rebase onto http://reviews.llvm.org/rL247238. - Run `clang-format` on this patch. - Push `va_arg` emission down into the `ABIInfo` hierarchy. I threaded the `IsMS` parameter from the `VAArgExpr` through the `EmitVAArg` meth

r247248 - [MS ABI] Select a pointer to member representation more often

2015-09-10 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Sep 10 02:20:05 2015 New Revision: 247248 URL: http://llvm.org/viewvc/llvm-project?rev=247248&view=rev Log: [MS ABI] Select a pointer to member representation more often Given a reference to a pointer to member whose class's inheritance model is unspecified, make sure w

Re: [PATCH] D10414: Attach function attribute "arm-restrict-it" instead of passing arm-restrict-it as a backend-option

2015-09-10 Thread James Molloy via cfe-commits
jmolloy added a subscriber: jmolloy. jmolloy added a comment. Hi Akira, I'm sorry to be contrary (and I missed the discussion on Tuesday because I was away on vacation) but I think there *is* a usecase for -mno-restrict-it to work, and I would hate to see it broken. Non-restricted IT blocks ar

Re: [Diffusion] rL247251: [OPENMP] Outlined function for parallel and other regions with list of…

2015-09-10 Thread NAKAMURA Takumi via cfe-commits
chapuni added subscribers: cfe-commits, chapuni. chapuni added a comment. See also; http://bb.pgr.jp/builders/clang-i686-cygwin-RA-centos6/builds/20524 /cfe/trunk/test/OpenMP/parallel_codegen.cpp:99 Seems it is incompatible to 32-bit targets, for example, i686-linux, i686-cygwin. define inte

Re: PATCH: Expose the 'file' that is associated with a compile database command

2015-09-10 Thread Manuel Klimek via cfe-commits
@@ -179,11 +185,13 @@ public: /// \param Directory The base directory used in the FixedCompilationDatabase. static FixedCompilationDatabase *loadFromCommandLine(int &Argc, const char *const *Argv, -

Re: [PATCH] D11797: [LIbClang] Report the named type for ElaboratedType

2015-09-10 Thread Manuel Klimek via cfe-commits
klimek added a comment. Ok, so just for my understanding: the nested name specifier in the changed tests canonicaltype is *not* the user-written type (thus, what the elaborated type would get us), but the full nested name specifier of the canonical type? http://reviews.llvm.org/D11797 _

Re: [Diffusion] rL247251: [OPENMP] Outlined function for parallel and other regions with list of…

2015-09-10 Thread Bataev, Alexey via cfe-commits
Yes, I know. Fixing it right now. Will be fixed in few minutes, thanks. Best regards, Alexey Bataev = Software Engineer Intel Compiler Team 10.09.2015 11:46, NAKAMURA Takumi пишет: chapuni added subscribers: cfe-commits, chapuni. chapuni added a comment. See also; http://bb.pgr.jp/

Re: [Diffusion] rL247251: [OPENMP] Outlined function for parallel and other regions with list of…

2015-09-10 Thread Alexey Bataev via cfe-commits
ABataev added a subscriber: ABataev. ABataev added a comment. Yes, I know. Fixing it right now. Will be fixed in few minutes, thanks. Best regards, Alexey Bataev = Software Engineer Intel Compiler Team 10.09.2015 11:46, NAKAMURA Takumi пишет: > chapuni added subscribers: cfe-commi

Re: [PATCH] D12732: Add a deprecation notice to the clang-modernize documentation.

2015-09-10 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D12732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

r247255 - [OPENMP] Fix test incompatibility with 32-bit platforms

2015-09-10 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Sep 10 04:06:59 2015 New Revision: 247255 URL: http://llvm.org/viewvc/llvm-project?rev=247255&view=rev Log: [OPENMP] Fix test incompatibility with 32-bit platforms Modified: cfe/trunk/test/OpenMP/parallel_codegen.cpp Modified: cfe/trunk/test/OpenMP/parallel_codegen.

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:458 @@ -438,2 +457,3 @@ // variable. for (const auto &I : Usages) { + std::string ReplaceText; I'd call that 'Usage' here, as it's not an iterator.

[clang-tools-extra] r247258 - Add a deprecation notice to the clang-modernize documentation.

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 04:42:01 2015 New Revision: 247258 URL: http://llvm.org/viewvc/llvm-project?rev=247258&view=rev Log: Add a deprecation notice to the clang-modernize documentation. Summary: Add a deprecation notice to the clang-modernize documentation. Remove the reference to the e

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Angel Garcia via cfe-commits
angelgarcia updated this revision to Diff 34422. angelgarcia marked 4 inline comments as done. angelgarcia added a comment. Document Usage's fields and other comments. http://reviews.llvm.org/D12734 Files: clang-tidy/modernize/LoopConvertCheck.cpp clang-tidy/modernize/LoopConvertCheck.h c

r247260 - [OPENMP] Propagate alignment from original variables to the private copies.

2015-09-10 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Sep 10 04:48:30 2015 New Revision: 247260 URL: http://llvm.org/viewvc/llvm-project?rev=247260&view=rev Log: [OPENMP] Propagate alignment from original variables to the private copies. Currently private copies of captured variables have default alignment. Patch makes priv

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: clang-tidy/modernize/LoopConvertUtils.cpp:765-766 @@ -764,2 +764,4 @@ // exactly one usage. - addUsage(Usage(nullptr, false, C->getLocation())); + // We are using the 'IsArrow' field of Usage to store if we have to add +

[clang-tools-extra] r247261 - [clang-tidy] Add inconsistent declaration parameter name check

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 05:07:11 2015 New Revision: 247261 URL: http://llvm.org/viewvc/llvm-project?rev=247261&view=rev Log: [clang-tidy] Add inconsistent declaration parameter name check This is first of series of patches, porting code from my project colobot-lint, as I mentioned recentl

Re: [PATCH] D12462: [PATCH] [clang-tidy] Add inconsistent declaration parameter name check

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh closed this revision. alexfh added a comment. Committed revision 247261. Thank you again for the new awesome check! http://reviews.llvm.org/D12462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Angel Garcia via cfe-commits
angelgarcia updated this revision to Diff 34427. angelgarcia added a comment. Replace the IsArrow field of Usage with an enum. http://reviews.llvm.org/D12734 Files: clang-tidy/modernize/LoopConvertCheck.cpp clang-tidy/modernize/LoopConvertCheck.h clang-tidy/modernize/LoopConvertUtils.cpp

[clang-tools-extra] r247266 - [clang-tidy] Renamed tests files to be closer to the check names.

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 05:58:38 2015 New Revision: 247266 URL: http://llvm.org/viewvc/llvm-project?rev=247266&view=rev Log: [clang-tidy] Renamed tests files to be closer to the check names. Added: clang-tools-extra/trunk/test/clang-tidy/google-build-explicit-make-pair.cpp - co

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:468-470 @@ +467,5 @@ +// are VarDecl). If the index is captured by value, add '&' to capture +// by reference instead. +ReplaceText = +Usage.Kind == Usage::UK_Ca

r247268 - [OPENMP] Fix test incompatibility with Windows codegen.

2015-09-10 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Sep 10 06:09:46 2015 New Revision: 247268 URL: http://llvm.org/viewvc/llvm-project?rev=247268&view=rev Log: [OPENMP] Fix test incompatibility with Windows codegen. Modified: cfe/trunk/test/OpenMP/parallel_codegen.cpp Modified: cfe/trunk/test/OpenMP/parallel_codegen.

r247270 - [OPENMP] Fix test incompatibility with Windows.

2015-09-10 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Sep 10 06:31:04 2015 New Revision: 247270 URL: http://llvm.org/viewvc/llvm-project?rev=247270&view=rev Log: [OPENMP] Fix test incompatibility with Windows. Modified: cfe/trunk/test/OpenMP/parallel_codegen.cpp Modified: cfe/trunk/test/OpenMP/parallel_codegen.cpp URL:

Re: [PATCH] D12725: [analyzer] A fix for substraction of an integer from a pointer.

2015-09-10 Thread Artem Dergachev via cfe-commits
NoQ updated this revision to Diff 34423. NoQ added a comment. Make the tests easier to understand. http://reviews.llvm.org/D12725 Files: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp test/Analysis/ptr-arith.c Index: test/Analysis/ptr-arith.c

Re: [PATCH] D12725: [analyzer] A fix for substraction of an integer from a pointer.

2015-09-10 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Thanks, fixed :) http://reviews.llvm.org/D12725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Angel Garcia via cfe-commits
angelgarcia updated this revision to Diff 34428. angelgarcia added a comment. Comment the enumerators. > Do we need default? I think so. We need to set the cases that do not fall in any of these categories to something, and I think that using one of the other three as the default kind would b

r247273 - [OPENMP] Generate threadprivates as TLS variables by default.

2015-09-10 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Sep 10 07:06:58 2015 New Revision: 247273 URL: http://llvm.org/viewvc/llvm-project?rev=247273&view=rev Log: [OPENMP] Generate threadprivates as TLS variables by default. If target supports TLS all threadprivates are generated as TLS. If target does not support TLS, use r

D12689: [libc++][static linking] std streams are not initialized prior to their use in static object constructors

2015-09-10 Thread Evgeny Astigeevich via cfe-commits
Ping. Could anyone review the patch? Kind regards, Evgeny Astigeevich -Original Message- From: Evgeny Astigeevich [mailto:evgeny.astigeev...@arm.com] Sent: 08 September 2015 11:00 To: Evgeny Astigeevich Cc: cfe-commits@lists.llvm.org Subject: [PATCH] D12689: [libc++][static linking] std s

r247277 - AVX-512: Changed nidx parameter in extractf64/32 intrinsic from i8 to i32 according to the Intel Spec

2015-09-10 Thread Igor Breger via cfe-commits
Author: ibreger Date: Thu Sep 10 07:55:54 2015 New Revision: 247277 URL: http://llvm.org/viewvc/llvm-project?rev=247277&view=rev Log: AVX-512: Changed nidx parameter in extractf64/32 intrinsic from i8 to i32 according to the Intel Spec Differential Revision: http://reviews.llvm.org/D12752 Modif

[clang-tools-extra] r247282 - [clang-tidy] add_new_check.py improvements: add doc file, refer it from .h

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 08:56:39 2015 New Revision: 247282 URL: http://llvm.org/viewvc/llvm-project?rev=247282&view=rev Log: [clang-tidy] add_new_check.py improvements: add doc file, refer it from .h + some console logging and minor cleanups. Modified: clang-tools-extra/trunk/clang-t

[PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh created this revision. alexfh added a reviewer: djasper. alexfh added a subscriber: cfe-commits. sizeof(some_std_string) is likely to be an error. This check finds this pattern and suggests using .size() instead. http://reviews.llvm.org/D12759 Files: clang-tidy/misc/CMakeLists.txt cla

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 34441. alexfh added a comment. Ignore template instantiations. http://reviews.llvm.org/D12759 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofContainerCheck.cpp clang-tidy/misc/SizeofContainerCheck.h d

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a comment. Great idea for a checker! Some comments below. Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:36 @@ +35,3 @@ + Finder->addMatcher( + expr(sizeOfExpr( + has(expr(hasType(hasC

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 34446. alexfh added a comment. Match a broader set of containers. Updated diagnostic message. Added tests. http://reviews.llvm.org/D12759 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofContainerCheck.cpp

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh marked 3 inline comments as done. Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:37 @@ +36,3 @@ + expr(unless(isInTemplateInstantiation()), + sizeOfExpr( + has(expr(hasType(hasCanonicalType(hasDeclaration(recordDecl( Yes,

r247286 - Properly close documentation /code blocks with /endcode.

2015-09-10 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Sep 10 10:13:22 2015 New Revision: 247286 URL: http://llvm.org/viewvc/llvm-project?rev=247286&view=rev Log: Properly close documentation /code blocks with /endcode. Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Modified: cfe/trunk/include/clang/AS

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Aaron Ballman via cfe-commits
On Thu, Sep 10, 2015 at 10:54 AM, Alexander Kornienko wrote: > alexfh marked 3 inline comments as done. > > > Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:37 > @@ +36,3 @@ > + expr(unless(isInTemplateInstantiation()), > + sizeOfExpr( > + has(ex

Re: [PATCH] D10414: Attach function attribute "arm-restrict-it" instead of passing arm-restrict-it as a backend-option

2015-09-10 Thread Jim Grosbach via cfe-commits
> On Sep 10, 2015, at 1:24 AM, James Molloy wrote: > > jmolloy added a subscriber: jmolloy. > jmolloy added a comment. > > Hi Akira, > > I'm sorry to be contrary (and I missed the discussion on Tuesday because I > was away on vacation) but I think there *is* a usecase for -mno-restrict-it >

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. I noticed a few more things, but mostly nitpicky at this point. Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:22 @@ +21,3 @@ +bool needsParens(const Expr *E) { + E = E->IgnoreImpCasts(); + if (isa(E) || isa(E)) Should we a

Re: [PATCH] D11834: s/NDEBUG/LLVM_NDEBUG/ in most places to match the same LLVM change.

2015-09-10 Thread Tom Stellard via cfe-commits
tstellarAMD added a comment. Ping. http://reviews.llvm.org/D11834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D10414: Attach function attribute "arm-restrict-it" instead of passing arm-restrict-it as a backend-option

2015-09-10 Thread Jim Grosbach via cfe-commits
grosbach added a comment. In http://reviews.llvm.org/D10414#243056, @jmolloy wrote: > Non-restricted IT blocks are indeed deprecated for ARMv8 in the ARMARM. But > there are circumstances where you may still want to emit them - the biggest > example being you're compiling for a CPU microarchite

Re: [PATCH] D12689: [libc++][static linking] std streams are not initialized prior to their use in static object constructors

2015-09-10 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: rnk. rnk added a comment. I think a better approach would be to use `__attribute__((init_priority(101)))` on Linux and `#pragma init_seg(lib)` on Windows to ensure that libc++'s iostream initializer runs earlier. http://reviews.llvm.org/D12689 ___

Re: [PATCH] D1623: Support __builtin_ms_va_list.

2015-09-10 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3598 @@ -3599,1 +3597,3 @@ +Address CodeGenFunction::EmitVAArg(Address VAListAddr, QualType Ty, bool IsMS) { + return CGM.getTypes().getABIInfo().EmitVAArg(*this, VAListAddr, Ty, IsMS); } I think kee

Re: [PATCH] D10414: Attach function attribute "arm-restrict-it" instead of passing arm-restrict-it as a backend-option

2015-09-10 Thread James Molloy via cfe-commits
jmolloy added a comment. Hi Jim, In an ideal world, yes. However there's no guarantee that all ARM implementors will (a) be able to commit to LLVM or (b) use ToT. Perhaps they're building a project that uses clang, or a specific version of clang, and this tuning option makes things go faster o

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh updated this revision to Diff 34451. alexfh marked 3 inline comments as done. alexfh added a comment. Don't complain on the ARRAYSIZE() pattern (where sizeof(container) is used as a denominator). http://reviews.llvm.org/D12759 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/Mis

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread Mehdi Amini via cfe-commits
> On Sep 9, 2015, at 7:06 PM, David Blaikie wrote: > > > > On Wed, Sep 9, 2015 at 6:46 PM, Mehdi Amini via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Author: mehdi_amini > Date: Wed Sep 9 20:46:39 2015 > New Revision: 247233 > > URL: http://llvm.org/viewvc/llvm-project?rev=2

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread David Blaikie via cfe-commits
On Thu, Sep 10, 2015 at 9:00 AM, Mehdi Amini wrote: > > On Sep 9, 2015, at 7:06 PM, David Blaikie wrote: > > > > On Wed, Sep 9, 2015 at 6:46 PM, Mehdi Amini via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: mehdi_amini >> Date: Wed Sep 9 20:46:39 2015 >> New Revision: 247233 >

Re: [PATCH] D12695: [Driver] Use UniversalCRT on Windows if available

2015-09-10 Thread Reid Kleckner via cfe-commits
rnk added a subscriber: ruiu. rnk added a comment. FYI @ruiu is moving this code to LLVM in http://reviews.llvm.org/D12604. Comment at: lib/Driver/MSVCToolChain.cpp:328-340 @@ +327,15 @@ + llvm::sys::path::append(libPath, "Lib", ucrtVersion, "ucrt"); + switch (getArch()) { +

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
alexfh marked 5 inline comments as done. Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:23 @@ +22,3 @@ + E = E->IgnoreImpCasts(); + if (isa(E) || isa(E)) +return true; I don't think we need to remove anything beyond the most external pair of parenthes

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread Mehdi Amini via cfe-commits
> On Sep 10, 2015, at 9:02 AM, David Blaikie wrote: > > > > On Thu, Sep 10, 2015 at 9:00 AM, Mehdi Amini > wrote: > >> On Sep 9, 2015, at 7:06 PM, David Blaikie > > wrote: >> >> >> >> On Wed, Sep 9, 2015 at 6:46 PM, Mehdi Amini via

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Alexander Kornienko via cfe-commits
On Thu, Sep 10, 2015 at 5:22 PM, Aaron Ballman wrote: > > > > Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:49 > > @@ +48,3 @@ > > + SourceLocation SizeOfLoc = SizeOf->getLocStart(); > > + auto Diag = diag(SizeOfLoc, "sizeof() doesn't return the size of the " > > +

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread David Blaikie via cfe-commits
On Thu, Sep 10, 2015 at 9:07 AM, Mehdi Amini wrote: > > On Sep 10, 2015, at 9:02 AM, David Blaikie wrote: > > > > On Thu, Sep 10, 2015 at 9:00 AM, Mehdi Amini > wrote: > >> >> On Sep 9, 2015, at 7:06 PM, David Blaikie wrote: >> >> >> >> On Wed, Sep 9, 2015 at 6:46 PM, Mehdi Amini via cfe-commi

Re: [PATCH] D12689: [libc++][static linking] std streams are not initialized prior to their use in static object constructors

2015-09-10 Thread Evgeny Astigeevich via cfe-commits
eastig added a comment. In http://reviews.llvm.org/D12689#243295, @rnk wrote: > I think a better approach would be to use > `__attribute__((init_priority(101)))` on Linux and `#pragma init_seg(lib)` on > Windows to ensure that libc++'s iostream initializer runs earlier. Thank you for advice.

[PATCH] D12767: [Static Analyzer] Properly clean up the dynamic type information for dead regions.

2015-09-10 Thread Gábor Horváth via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: zaks.anna, dcoughlin, jordan_rose, krememek. xazax.hun added a subscriber: cfe-commits. This patch is intended to clean up the dynamic type information for regions that are dead. The behavior should not change. In the a future patch it

Re: [PATCH] D12381: [Static Analyzer] Merge the Objective-C Generics Checker into Dynamic Type Propagation checker.

2015-09-10 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In http://reviews.llvm.org/D12381#241709, @xazax.hun wrote: > There are several fallouts from this review, so I decided to split this patch > up the following way: > > 1. I created a patch to incorporate the result of this review into > ObjCGenericsChecker: http://rev

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Aaron Ballman via cfe-commits
On Thu, Sep 10, 2015 at 12:04 PM, Alexander Kornienko wrote: > alexfh marked 5 inline comments as done. > > > Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:23 > @@ +22,3 @@ > + E = E->IgnoreImpCasts(); > + if (isa(E) || isa(E)) > +return true; > > I d

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Aaron Ballman via cfe-commits
On Thu, Sep 10, 2015 at 12:14 PM, Alexander Kornienko wrote: > On Thu, Sep 10, 2015 at 5:22 PM, Aaron Ballman > wrote: >> >> > >> > Comment at: clang-tidy/misc/SizeofContainerCheck.cpp:49 >> > @@ +48,3 @@ >> > + SourceLocation SizeOfLoc = SizeOf->getLocStart(); >> > + auto Diag

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-10 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! http://reviews.llvm.org/D12759 ___ cfe-commits mailing list cfe-commits@lists.

[clang-tools-extra] r247297 - [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stl

2015-09-10 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Sep 10 11:37:46 2015 New Revision: 247297 URL: http://llvm.org/viewvc/llvm-project?rev=247297&view=rev Log: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stl containers. Summary: sizeof(some_std_string) is likely to be an error. This check finds th

r247302 - Re-commit r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"

2015-09-10 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Sep 10 12:07:54 2015 New Revision: 247302 URL: http://llvm.org/viewvc/llvm-project?rev=247302&view=rev Log: Re-commit r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes" This never broke the build; it was the LLVM side, r247216, that caused problems. M

Re: [PATCH] D12741: [Clang] Fix Clang-tidy misc-use-override warnings, other minor fixes

2015-09-10 Thread Hans Wennborg via cfe-commits
hans added a comment. Re-committed in r247302. Repository: rL LLVM http://reviews.llvm.org/D12741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r247303 - Debug Info: Remove an unnecessary debug type visitor.

2015-09-10 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Thu Sep 10 12:13:31 2015 New Revision: 247303 URL: http://llvm.org/viewvc/llvm-project?rev=247303&view=rev Log: Debug Info: Remove an unnecessary debug type visitor. Thanks to dblaikie for spotting this. Modified: cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp

Re: [PATCH] D12619: [Static Analyzer] Minor cleanups for the nullability checker.

2015-09-10 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 34458. xazax.hun added a comment. - Updated to latest trunk - Reworded the diagnostic messages http://reviews.llvm.org/D12619 Files: lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp Index: lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp ==

Re: r247303 - Debug Info: Remove an unnecessary debug type visitor.

2015-09-10 Thread David Blaikie via cfe-commits
On Thu, Sep 10, 2015 at 10:13 AM, Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: adrian > Date: Thu Sep 10 12:13:31 2015 > New Revision: 247303 > > URL: http://llvm.org/viewvc/llvm-project?rev=247303&view=rev > Log: > Debug Info: Remove an unnecessary debug type visit

Re: r247303 - Debug Info: Remove an unnecessary debug type visitor.

2015-09-10 Thread David Blaikie via cfe-commits
On Thu, Sep 10, 2015 at 10:18 AM, David Blaikie wrote: > > > On Thu, Sep 10, 2015 at 10:13 AM, Adrian Prantl via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: adrian >> Date: Thu Sep 10 12:13:31 2015 >> New Revision: 247303 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=2473

Re: r247303 - Debug Info: Remove an unnecessary debug type visitor.

2015-09-10 Thread Adrian Prantl via cfe-commits
> On Sep 10, 2015, at 10:19 AM, David Blaikie wrote: > > > > On Thu, Sep 10, 2015 at 10:18 AM, David Blaikie > wrote: > > > On Thu, Sep 10, 2015 at 10:13 AM, Adrian Prantl via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Author: adrian > Date: Thu S

r247307 - [CUDA] Allow trivial constructors as initializer for __shared__ variables.

2015-09-10 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Sep 10 12:26:58 2015 New Revision: 247307 URL: http://llvm.org/viewvc/llvm-project?rev=247307&view=rev Log: [CUDA] Allow trivial constructors as initializer for __shared__ variables. Differential Revision: http://reviews.llvm.org/D12739 Modified: cfe/trunk/lib/CodeGen/C

Re: [PATCH] D12739: [CUDA] Allow trivial constructors as initializer for __shared__ variables.

2015-09-10 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL247307: [CUDA] Allow trivial constructors as initializer for __shared__ variables. (authored by tra). Changed prior to commit: http://reviews.llvm.org/D12739?vs=34372&id=34460#toc Repository: rL LLVM

Re: r247303 - Debug Info: Remove an unnecessary debug type visitor.

2015-09-10 Thread David Blaikie via cfe-commits
On Thu, Sep 10, 2015 at 10:25 AM, Adrian Prantl wrote: > > On Sep 10, 2015, at 10:19 AM, David Blaikie wrote: > > > > On Thu, Sep 10, 2015 at 10:18 AM, David Blaikie > wrote: > >> >> >> On Thu, Sep 10, 2015 at 10:13 AM, Adrian Prantl via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>

Re: [PATCH] D12695: [Driver] Use UniversalCRT on Windows if available

2015-09-10 Thread Igor Kudrin via cfe-commits
ikudrin updated this revision to Diff 34462. ikudrin added a comment. - Extracted a function to convert an architecture type to a library subfolder name. - Added a method to check if we should use Universal CRT depending on the chosen version of Visual Studio. http://reviews.llvm.org/D12695 F

Re: [PATCH] D12695: [Driver] Use UniversalCRT on Windows if available

2015-09-10 Thread Igor Kudrin via cfe-commits
ikudrin updated this revision to Diff 34465. ikudrin marked an inline comment as done. ikudrin added a comment. Just added more context to the patch. http://reviews.llvm.org/D12695 Files: lib/Driver/MSVCToolChain.cpp lib/Driver/ToolChains.h lib/Driver/Tools.cpp Index: lib/Driver/Tools.cp

Re: [PATCH] D11797: [LIbClang] Report the named type for ElaboratedType

2015-09-10 Thread Sergey Kalinichev via cfe-commits
skalinichev added a comment. AFAIUI the canonical type could never be an elaborated type, but just type could. And yes before we used nested name specifier from the type name as written in the source code (a.k.a. ElaboratedType), now we use nested name specifier of the type that the elaborated

[PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, xazax.hun. dcoughlin added a subscriber: cfe-commits. Update the static analyzer buildbot script to set -isysroot to the OS X SDK path when analyzing preprocessed files. http://reviews.llvm.org/D12769 Files: utils/analyzer

Re: [PATCH] D12695: [Driver] Use UniversalCRT on Windows if available

2015-09-10 Thread Igor Kudrin via cfe-commits
ikudrin marked an inline comment as done. ikudrin added a comment. In http://reviews.llvm.org/D12695#243320, @rnk wrote: > FYI @ruiu is moving this code to LLVM in http://reviews.llvm.org/D12604. Thanks. I think I'll move my changes to the new place when he's finished. http://reviews.llvm.org

Re: [PATCH] D11664: [CUDA] Implemented additional processing steps needed to link with CUDA libdevice bitcode.

2015-09-10 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 34467. tra added a comment. Removed unneeded #includes. http://reviews.llvm.org/D11664 Files: include/clang/Basic/LangOptions.def include/clang/Driver/CC1Options.td lib/CodeGen/CodeGenAction.cpp lib/Frontend/CompilerInvocation.cpp test/CodeGenCUDA/Inp

Re: [PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: utils/analyzer/SATestBuild.py:277 @@ +276,3 @@ +# For now, we assume the preprocessed files should be analyzed +# with the OS X SDK. +SDKPath = getSDKPath("macosx") I think it might be better to check if the

Re: [PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. - on other OS-es like linux. http://reviews.llvm.org/D12769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12695: [Driver] Use UniversalCRT on Windows if available

2015-09-10 Thread Reid Kleckner via cfe-commits
rnk added a comment. There's a bunch of whitespace issues that clang-format can resolve. We also have the convention that variables are StudlyCaps, which isn't followed in a few places. Do you need someone to commit this for you? If so, I can patch this in, test it manually, and deal with the

Re: [PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: utils/analyzer/SATestBuild.py:277 @@ +276,3 @@ +# For now, we assume the preprocessed files should be analyzed +# with the OS X SDK. +SDKPath = getSDKPath("macosx") xazax.hun wrote: > I think it might be bet

Re: [PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: utils/analyzer/SATestBuild.py:277 @@ +276,3 @@ +# For now, we assume the preprocessed files should be analyzed +# with the OS X SDK. +SDKPath = getSDKPath("macosx") dcoughlin wrote: > xazax.hun wrote: > > I

Re: [PATCH] D11664: [CUDA] Implemented additional processing steps needed to link with CUDA libdevice bitcode.

2015-09-10 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL247317: [CUDA] Postprocess bitcode linked in during device-side CUDA compilation. (authored by tra). Changed prior to commit: http://reviews.llvm.org/D11664?vs=34467&id=34470#toc Repository: rL LLVM

r247317 - [CUDA] Postprocess bitcode linked in during device-side CUDA compilation.

2015-09-10 Thread Artem Belevich via cfe-commits
Author: tra Date: Thu Sep 10 13:24:23 2015 New Revision: 247317 URL: http://llvm.org/viewvc/llvm-project?rev=247317&view=rev Log: [CUDA] Postprocess bitcode linked in during device-side CUDA compilation. Link in and internalize the symbols we need from supplied bitcode library. Differential Revi

Re: [PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: utils/analyzer/SATestBuild.py:277 @@ +276,3 @@ +# For now, we assume the preprocessed files should be analyzed +# with the OS X SDK. +SDKPath = getSDKPath("macosx") xazax.hun wrote: > dcoughlin wrote: > > xa

Re: [PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 34471. dcoughlin added a comment. Pass -cc1 to clang even when SDK path is not found. http://reviews.llvm.org/D12769 Files: utils/analyzer/SATestBuild.py Index: utils/analyzer/SATestBuild.py =

Re: PATCH: Expose the 'file' that is associated with a compile database command

2015-09-10 Thread Argyrios Kyrtzidis via cfe-commits
> On Sep 10, 2015, at 1:48 AM, Manuel Klimek wrote: > > @@ -179,11 +185,13 @@ public: >/// \param Directory The base directory used in the > FixedCompilationDatabase. >static FixedCompilationDatabase *loadFromCommandLine(int &Argc, >

Re: [PATCH] D12695: [Driver] Use UniversalCRT on Windows if available

2015-09-10 Thread Igor Kudrin via cfe-commits
ikudrin added a comment. In http://reviews.llvm.org/D12695#243552, @rnk wrote: > There's a bunch of whitespace issues that clang-format can resolve. Thanks! I'll reformat it. > We also have the convention that variables are StudlyCaps, which isn't > followed in a few places. I've tried to f

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread Richard Smith via cfe-commits
On Thu, Sep 10, 2015 at 9:13 AM, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > > On Thu, Sep 10, 2015 at 9:07 AM, Mehdi Amini > wrote: > >> >> On Sep 10, 2015, at 9:02 AM, David Blaikie wrote: >> >> >> >> On Thu, Sep 10, 2015 at 9:00 AM, Mehdi Amini >> wrote: >> >>> >>>

r247318 - [SEH] Use catchret in the new EH IR like we do for C++

2015-09-10 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Sep 10 13:39:41 2015 New Revision: 247318 URL: http://llvm.org/viewvc/llvm-project?rev=247318&view=rev Log: [SEH] Use catchret in the new EH IR like we do for C++ Also add tests for SEH with the new IRGen. Added: cfe/trunk/test/CodeGen/exceptions-seh-new.c - copie

r247319 - Add a getDeclContextDescriptor() helper function to CGDebugInfo. (NFC)

2015-09-10 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Thu Sep 10 13:39:45 2015 New Revision: 247319 URL: http://llvm.org/viewvc/llvm-project?rev=247319&view=rev Log: Add a getDeclContextDescriptor() helper function to CGDebugInfo. (NFC) Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp cfe/trunk/lib/CodeGen/CGDebugInfo.h

Re: r247233 - EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)

2015-09-10 Thread David Blaikie via cfe-commits
On Thu, Sep 10, 2015 at 11:39 AM, Richard Smith wrote: > On Thu, Sep 10, 2015 at 9:13 AM, David Blaikie via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> >> >> On Thu, Sep 10, 2015 at 9:07 AM, Mehdi Amini >> wrote: >> >>> >>> On Sep 10, 2015, at 9:02 AM, David Blaikie wrote: >>> >>> >

Re: [PATCH] D12689: [libc++][static linking] std streams are not initialized prior to their use in static object constructors

2015-09-10 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. Can we instead fix this in Clang by ensuring that libc++ is put at the right position in the static link order so that its initializers run first? libc++'s avoidance of running iostreams init code from every translation unit is a signif

Re: Preventing several replacements on a macro call.

2015-09-10 Thread Argyrios Kyrtzidis via cfe-commits
Hi Angel, This part of the code is conservative because it is not clear if accepting the change in all the different places where the macro argument is expanded is acceptable or not. For a contrived example, let’s say you have this macro definition: #define MY_MAC(x) foo(x) + bar(x) an

Re: [PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-09-10 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. OK, thanks. I'll go ahead and commit this patch and the llvm-side patch. http://reviews.llvm.org/D11815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r247324 - Driver: Support cfi-icall on all OSs when targeting x86/x86_64.

2015-09-10 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Thu Sep 10 14:18:05 2015 New Revision: 247324 URL: http://llvm.org/viewvc/llvm-project?rev=247324&view=rev Log: Driver: Support cfi-icall on all OSs when targeting x86/x86_64. Modified: cfe/trunk/lib/Driver/ToolChain.cpp cfe/trunk/lib/Driver/ToolChains.cpp cfe/trunk/

Re: Preventing several replacements on a macro call.

2015-09-10 Thread Angel Garcia via cfe-commits
Hi Argyrios, Thank you for your answer. I think that it is pretty clear that we don't really want to allow changes like the one in your example. But my problem is almost the opposite. I have something like this: #define MY_MAC(x,y) doSomething(x, y); which is used in this way: MY_MAC(var1, var1

Re: [PATCH] D12695: [Driver] Use UniversalCRT on Windows if available

2015-09-10 Thread Igor Kudrin via cfe-commits
ikudrin updated this revision to Diff 34475. ikudrin added a comment. - Fixed formatting issues. - Normalized VariableNames. - Reworked the useUniversalCRT method to receive a path of Visual Studio. http://reviews.llvm.org/D12695 Files: lib/Driver/MSVCToolChain.cpp lib/Driver/ToolChains.h

Re: [PATCH] D12402: PR24595: clang-cl fails to compile vswriter.h header from Windows SDK 8.1 in 32 bit mode

2015-09-10 Thread Andrey Bokhanko via cfe-commits
andreybokhanko marked 8 inline comments as done. andreybokhanko added a comment. http://reviews.llvm.org/D12402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12402: PR24595: clang-cl fails to compile vswriter.h header from Windows SDK 8.1 in 32 bit mode

2015-09-10 Thread Andrey Bokhanko via cfe-commits
andreybokhanko updated this revision to Diff 34477. andreybokhanko added a comment. Reid, Sorry for delayed reply. All your comments are fixed (it turned out that usage of DefaultCC instead of ToCC is the root of all evil; after I fixed this, all other problems went away). Patch updated; pleas

r247327 - Move sel-address.mm from test/CodeGenCXX to test/SemaObjCXX, it's not a codegen test.

2015-09-10 Thread Nico Weber via cfe-commits
Author: nico Date: Thu Sep 10 14:35:31 2015 New Revision: 247327 URL: http://llvm.org/viewvc/llvm-project?rev=247327&view=rev Log: Move sel-address.mm from test/CodeGenCXX to test/SemaObjCXX, it's not a codegen test. Added: cfe/trunk/test/SemaObjCXX/sel-address.mm - copied, changed fro

Re: [PATCH] D12695: [Driver] Use UniversalCRT on Windows if available

2015-09-10 Thread Rui Ueyama via cfe-commits
ruiu added a comment. I'm sorry about leave http://reviews.llvm.org/D12604 hanging. I didn't notice that it got a new review message. Don't mind my patch -- please just submit when you got LGTM http://reviews.llvm.org/D12695 ___ cfe-commits mailin

  1   2   >