Re: [cfe-commits] [PATCH] Reverted clang-check to fully supported CommandLine Library use-case: global static variables.

2012-08-17 Thread Manuel Klimek
+using namespace llvm; Remove from header. Appart from that, lgtm, minus Chandler's approval of the general idea. On Thu, Aug 16, 2012 at 7:17 PM, Alexander Kornienko ale...@google.com wrote: On Thu, Aug 16, 2012 at 7:04 PM, Manuel Klimek kli...@google.com wrote: On Thu, Aug 16, 2012 at 5:45

Re: [cfe-commits] [PATCH] Reverted clang-check to fully supported CommandLine Library use-case: global static variables.

2012-08-17 Thread Chandler Carruth
Er, my suggestion was to make these *static* variables, yes, even though they are in a header file, and then to document thoroughly that this header file is *not* for use within a library, but for use directly within the file defining main. The current patch is different from that, can you

Re: [cfe-commits] [PATCH] Reverted clang-check to fully supported CommandLine Library use-case: global static variables.

2012-08-17 Thread Manuel Klimek
On Fri, Aug 17, 2012 at 11:41 AM, Chandler Carruth chandl...@google.com wrote: Er, my suggestion was to make these *static* variables, yes, even though they are in a header file, and then to document thoroughly that this header file is *not* for use within a library, but for use directly within

Re: [cfe-commits] protected anonymous union member not visible in derived class

2012-08-17 Thread Nikola Smiljanic
You should make this a non-optional argument; I think that should be fine for all the callers. (Your implementation isn't safe against null lookup results anyway, but it doesn't matter, because you don't need to rely on that.) I tried doing this, passed LookupResult by reference and had to

[cfe-commits] r162093 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Analysis/stack-addr-ps.cpp test/SemaCXX/convert-to-bool.cpp test/SemaCXX/references.cpp test/SemaCXX/uninitialized.cpp

2012-08-17 Thread Hans Wennborg
Author: hans Date: Fri Aug 17 05:12:33 2012 New Revision: 162093 URL: http://llvm.org/viewvc/llvm-project?rev=162093view=rev Log: Warn about self-initialization of references. Initializing a reference with itself, e.g. int a = a; seems like a very bad idea. Modified:

Re: [cfe-commits] [Patch] Warn about self-initialization of reference variables

2012-08-17 Thread Hans Wennborg
On Thu, Aug 16, 2012 at 9:24 PM, Richard Smith rich...@metafoo.co.uk wrote: LGTM, modulo a couple of small things: Thanks for the review! - if (!VDecl-hasLocalStorage() - (isaInitListExpr(Init) || !VDecl-getType()-isRecordType())) -CheckSelfReference(RealDecl, Init); + if

Re: [cfe-commits] r162093 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Analysis/stack-addr-ps.cpp test/SemaCXX/convert-to-bool.cpp test/SemaCXX/references.cpp test/SemaCXX/uninitialized.cpp

2012-08-17 Thread Chandler Carruth
On Fri, Aug 17, 2012 at 3:12 AM, Hans Wennborg h...@hanshq.net wrote: Author: hans Date: Fri Aug 17 05:12:33 2012 New Revision: 162093 URL: http://llvm.org/viewvc/llvm-project?rev=162093view=rev Log: Warn about self-initialization of references. Initializing a reference with itself, e.g.

Re: [cfe-commits] [PATCH] Reverted clang-check to fully supported CommandLine Library use-case: global static variables.

2012-08-17 Thread Alexander Kornienko
On Fri, Aug 17, 2012 at 11:41 AM, Chandler Carruth chandl...@google.comwrote: Er, my suggestion was to make these *static* variables, yes, even though they are in a header file, and then to document thoroughly that this header file is *not* for use within a library, but for use directly within

[cfe-commits] r162096 - in /cfe/trunk/test/CodeGenObjC: instance-method-metadata.m ns_consume_null_check.m

2012-08-17 Thread Benjamin Kramer
Author: d0k Date: Fri Aug 17 07:28:21 2012 New Revision: 162096 URL: http://llvm.org/viewvc/llvm-project?rev=162096view=rev Log: Fix broken check lines. Modified: cfe/trunk/test/CodeGenObjC/instance-method-metadata.m cfe/trunk/test/CodeGenObjC/ns_consume_null_check.m Modified:

Re: [cfe-commits] r162093 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Analysis/stack-addr-ps.cpp test/SemaCXX/convert-to-bool.cpp test/SemaCXX/references.cpp test/SemaCXX/uninitialized.cpp

2012-08-17 Thread Hans Wennborg
On Fri, Aug 17, 2012 at 12:10 PM, Chandler Carruth chandl...@google.com wrote: +namespace references { + int a = a; // expected-warning{{variable 'a' is uninitialized when used within its own initialization}} While completely correct (we are initializing the reference to an uninitialized

Re: [cfe-commits] [PATCH] Add -fobjc-direct-class-refs

2012-08-17 Thread Jonathan Schleifer
Any news on this? :) I assume you just forgot it as we already talked about ARC in the ObjFW runtime on objc-list@apple? -- Jonathan ___ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Re: [cfe-commits] [PATCH] Add -fobjc-direct-class-refs

2012-08-17 Thread Jean-Daniel Dupas
Please, when bumping a review request, re-attach the patch. Le 17 août 2012 à 16:04, Jonathan Schleifer j...@webkeks.org a écrit : Any news on this? :) I assume you just forgot it as we already talked about ARC in the ObjFW runtime on objc-list@apple? -- Jonathan

Re: [cfe-commits] [PATCH] Add -fobjc-direct-class-refs

2012-08-17 Thread Jonathan Schleifer
Am 17.08.2012 um 16:26 schrieb Jean-Daniel Dupas: Please, when bumping a review request, re-attach the patch. Ok, here goes again: This enables ARC for ObjFW, for which it now has preliminary support. It also sets the version to 9 (class) / 3 (protocol), which is necessary to have the new

Re: [cfe-commits] r161650 - in /cfe/trunk: include/clang/Frontend/VerifyDiagnosticConsumer.h lib/ARCMigrate/ARCMT.cpp lib/Frontend/VerifyDiagnosticConsumer.cpp test/ARCMT/verify.m test/ASTMerge/functi

2012-08-17 Thread Andy Gibbs
On Thursday, August 16, 2012 8:12 PM, Jordan Rose wrote: On Aug 16, 2012, at 11:00 , Andy Gibbs wrote: ---When we get a diagnostic--- if (is a macro expansion) ignore [[big culprit this one!]] Why not look at where the macro is instantiated? Is it necessary? A macro expansion itself will

[cfe-commits] r162102 - /cfe/trunk/docs/ReleaseNotes.html

2012-08-17 Thread Dmitri Gribenko
Author: gribozavr Date: Fri Aug 17 11:01:54 2012 New Revision: 162102 URL: http://llvm.org/viewvc/llvm-project?rev=162102view=rev Log: Add release notes for type safety attributes. Modified: cfe/trunk/docs/ReleaseNotes.html Modified: cfe/trunk/docs/ReleaseNotes.html URL:

Re: [cfe-commits] r162067 - in /cfe/trunk: docs/ include/clang/Basic/ include/clang/Parse/ include/clang/Sema/ lib/Parse/ lib/Sema/ test/Sema/

2012-08-17 Thread Dmitri Gribenko
On Thu, Aug 16, 2012 at 9:53 PM, Douglas Gregor dgre...@apple.com wrote: On Aug 16, 2012, at 5:08 PM, Dmitri Gribenko griboz...@gmail.com wrote: Author: gribozavr Date: Thu Aug 16 19:08:38 2012 New Revision: 162067 URL: http://llvm.org/viewvc/llvm-project?rev=162067view=rev Log: Add

[cfe-commits] r162105 - /cfe/trunk/lib/Sema/SemaStmt.cpp

2012-08-17 Thread Chad Rosier
Author: mcrosier Date: Fri Aug 17 11:38:04 2012 New Revision: 162105 URL: http://llvm.org/viewvc/llvm-project?rev=162105view=rev Log: [ms-inline asm] Instantiate the MCStreamer as a NullStream. We're parsing instruction, not emitting them, so a NullStream is fine. Modified:

Re: [cfe-commits] r161780 - in /cfe/trunk: lib/Sema/SemaStmt.cpp test/CodeGen/ms-inline-asm.c

2012-08-17 Thread Chad Rosier
On Aug 16, 2012, at 9:03 PM, Richard Smith wrote: On Mon, Aug 13, 2012 at 1:32 PM, Chad Rosier mcros...@apple.com wrote: Author: mcrosier Date: Mon Aug 13 15:32:07 2012 New Revision: 161780 URL: http://llvm.org/viewvc/llvm-project?rev=161780view=rev Log: [ms-inline asm] Have

[cfe-commits] r162106 - in /cfe/trunk: include/clang/Basic/Builtins.def test/Sema/builtins-decl.c

2012-08-17 Thread Benjamin Kramer
Author: d0k Date: Fri Aug 17 11:39:13 2012 New Revision: 162106 URL: http://llvm.org/viewvc/llvm-project?rev=162106view=rev Log: Define __builtin_ffs[ll] with a signed argument instead of unsigned. GCC documents these as unsigned, but defines them as signed. Modified:

Re: [cfe-commits] r161650 - in /cfe/trunk: include/clang/Frontend/VerifyDiagnosticConsumer.h lib/ARCMigrate/ARCMT.cpp lib/Frontend/VerifyDiagnosticConsumer.cpp test/ARCMT/verify.m test/ASTMerge/functi

2012-08-17 Thread Jordan Rose
On Aug 17, 2012, at 8:15 , Andy Gibbs andyg1...@hotmail.co.uk wrote: On Thursday, August 16, 2012 8:12 PM, Jordan Rose wrote: On Aug 16, 2012, at 11:00 , Andy Gibbs wrote: ---When we get a diagnostic--- if (is a macro expansion) ignore [[big culprit this one!]] Why not look at where the

[cfe-commits] [libcxx] r162108 - in /libcxx/trunk/include: bitset vector

2012-08-17 Thread Howard Hinnant
Author: hhinnant Date: Fri Aug 17 12:10:18 2012 New Revision: 162108 URL: http://llvm.org/viewvc/llvm-project?rev=162108view=rev Log: Consistently label __bit_array as a struct, not a class. Modified: libcxx/trunk/include/bitset libcxx/trunk/include/vector Modified:

[cfe-commits] r162109 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCast.cpp test/Sema/warn-bad-function-cast.c

2012-08-17 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Aug 17 12:22:34 2012 New Revision: 162109 URL: http://llvm.org/viewvc/llvm-project?rev=162109view=rev Log: c: implement gcc's -Wbad-function-cast which warns on unsafe cast of a c-function call. This is a C-only option. Added:

[cfe-commits] r162110 - in /cfe/trunk: lib/Frontend/ASTConsumers.cpp test/Tooling/clang-check-ast-dump.cpp

2012-08-17 Thread Alexander Kornienko
Author: alexfh Date: Fri Aug 17 12:38:39 2012 New Revision: 162110 URL: http://llvm.org/viewvc/llvm-project?rev=162110view=rev Log: Fixed crash and added a test and a minor output problem Modified: cfe/trunk/lib/Frontend/ASTConsumers.cpp cfe/trunk/test/Tooling/clang-check-ast-dump.cpp

[cfe-commits] [PATCH] AST Matchers: function and class template matchers

2012-08-17 Thread Dmitri Gribenko
Hello, The attached patch introduces functionTemplate(), classTemplate() and isExplicitTemplateSpecialization() matchers which do what their name says. Please review. Dmitri -- main(i,j){for(i=2;;i++){for(j=2;ji;j++){if(!(i%j)){j=0;break;}}if (j){printf(%d\n,i);}}} /*Dmitri Gribenko

[cfe-commits] [libcxx] r162111 - /libcxx/trunk/include/type_traits

2012-08-17 Thread Howard Hinnant
Author: hhinnant Date: Fri Aug 17 12:54:11 2012 New Revision: 162111 URL: http://llvm.org/viewvc/llvm-project?rev=162111view=rev Log: Apply patches supplied by Michel Morin in http://llvm.org/bugs/show_bug.cgi?id=13601 to correct bugs in is_convertible for the case that the intrinsic

Re: [cfe-commits] [PATCH] AST Matchers: function and class template matchers

2012-08-17 Thread Manuel Klimek
Hi Dmitri, thanks for the patch! @@ -385,7 +393,15 @@ /// void f(); const internal::VariadicDynCastAllOfMatcherDecl, FunctionDecl function; +/// \brief Matches C++ function template declarations. +/// +/// Example matches f +/// templateclass T void f(T t) {} +const

Re: [cfe-commits] r162109 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCast.cpp test/Sema/warn-bad-function-cast.c

2012-08-17 Thread Matt Beaumont-Gay
Can you explain the rationale behind this warning a little bit? It fires on some more-or-less reasonable code like this snippet from the Python Imaging Library: libImaging/Draw.c:448:51: error: cast from function call of type 'double' to non-matching type 'int' [-Werror,-Wbad-function-cast]

Re: [cfe-commits] [PATCH] AST Matchers: function and class template matchers

2012-08-17 Thread Dmitri Gribenko
Hi Manuel, Thank you for the review! Please find attached an updated patch. On Fri, Aug 17, 2012 at 10:58 AM, Manuel Klimek kli...@google.com wrote: @@ -385,7 +393,15 @@ /// void f(); const internal::VariadicDynCastAllOfMatcherDecl, FunctionDecl function; +/// \brief Matches C++

Re: [cfe-commits] r162109 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCast.cpp test/Sema/warn-bad-function-cast.c

2012-08-17 Thread Benjamin Kramer
On 17.08.2012, at 19:22, Fariborz Jahanian fjahan...@apple.com wrote: Author: fjahanian Date: Fri Aug 17 12:22:34 2012 New Revision: 162109 URL: http://llvm.org/viewvc/llvm-project?rev=162109view=rev Log: c: implement gcc's -Wbad-function-cast which warns on unsafe cast of a c-function

Re: [cfe-commits] [PATCH] AST Matchers: function and class template matchers

2012-08-17 Thread Manuel Klimek
lgtm On Fri, Aug 17, 2012 at 8:18 PM, Dmitri Gribenko griboz...@gmail.com wrote: Hi Manuel, Thank you for the review! Please find attached an updated patch. On Fri, Aug 17, 2012 at 10:58 AM, Manuel Klimek kli...@google.com wrote: @@ -385,7 +393,15 @@ /// void f(); const

[cfe-commits] r162115 - in /cfe/trunk: include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersInternal.h unittests/ASTMatchers/ASTMatchersTest.cpp

2012-08-17 Thread Dmitri Gribenko
Author: gribozavr Date: Fri Aug 17 13:42:47 2012 New Revision: 162115 URL: http://llvm.org/viewvc/llvm-project?rev=162115view=rev Log: AST Matchers: introduce functionTemplate(), classTemplate() and isExplicitTemplateSpecialization() matchers which do what their name says. Modified:

Re: [cfe-commits] [PATCH] AST Matchers: function and class template matchers

2012-08-17 Thread Dmitri Gribenko
On Fri, Aug 17, 2012 at 11:40 AM, Manuel Klimek kli...@google.com wrote: lgtm Thanks, committed r162115. Dmitri -- main(i,j){for(i=2;;i++){for(j=2;ji;j++){if(!(i%j)){j=0;break;}}if (j){printf(%d\n,i);}}} /*Dmitri Gribenko griboz...@gmail.com*/ ___

[cfe-commits] r162116 - in /cfe/trunk: lib/Driver/ToolChains.cpp test/Driver/darwin-sdkroot.c

2012-08-17 Thread Daniel Dunbar
Author: ddunbar Date: Fri Aug 17 13:43:50 2012 New Revision: 162116 URL: http://llvm.org/viewvc/llvm-project?rev=162116view=rev Log: darwin/driver: Support using SDKROOT to define the default for -isysroot. - The SDKROOT environment variable is the de facto way to set the default SDK for a

Re: [cfe-commits] r162109 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCast.cpp test/Sema/warn-bad-function-cast.c

2012-08-17 Thread jahanian
On Aug 17, 2012, at 11:11 AM, Matt Beaumont-Gay wrote: Can you explain the rationale behind this warning a little bit? It fires on some more-or-less reasonable code like this snippet from the Python Imaging Library: libImaging/Draw.c:448:51: error: cast from function call of type 'double'

[cfe-commits] r162117 - /cfe/trunk/include/clang/Basic/DiagnosticGroups.td

2012-08-17 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Aug 17 13:50:02 2012 New Revision: 162117 URL: http://llvm.org/viewvc/llvm-project?rev=162117view=rev Log: Remove -Wbad-function-cast from -Wall. Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td Modified:

Re: [cfe-commits] r162109 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCast.cpp test/Sema/warn-bad-function-cast.c

2012-08-17 Thread jahanian
On Aug 17, 2012, at 11:37 AM, Benjamin Kramer wrote: On 17.08.2012, at 19:22, Fariborz Jahanian fjahan...@apple.com wrote: Author: fjahanian Date: Fri Aug 17 12:22:34 2012 New Revision: 162109 URL: http://llvm.org/viewvc/llvm-project?rev=162109view=rev Log: c: implement gcc's

[cfe-commits] Plumbing through some MIPS options

2012-08-17 Thread Carl Norum
Over in this thread on the llvm-dev list: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052574.html It was suggested that I file bugs about having to pass some MIPS-specific flags through via -Xclang and -mllvm. I got a pointer to the right area of the tree, though, and came

Re: [cfe-commits] protected anonymous union member not visible in derived class

2012-08-17 Thread John McCall
On Aug 17, 2012, at 3:12 AM, Nikola Smiljanic wrote: You should make this a non-optional argument; I think that should be fine for all the callers. (Your implementation isn't safe against null lookup results anyway, but it doesn't matter, because you don't need to rely on that.) I tried

[cfe-commits] r162123 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h test/Analysis/blocks.m

2012-08-17 Thread Jordan Rose
Author: jrose Date: Fri Aug 17 15:16:34 2012 New Revision: 162123 URL: http://llvm.org/viewvc/llvm-project?rev=162123view=rev Log: [analyzer] Make BlockDataRegions typed, so that they have DynamicTypeInfo. Fixes rdar://problem/12119814 Modified:

[cfe-commits] r162125 - /cfe/trunk/test/Sema/warn-bad-function-cast.c

2012-08-17 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Aug 17 15:23:06 2012 New Revision: 162125 URL: http://llvm.org/viewvc/llvm-project?rev=162125view=rev Log: make this test case 64bit test. It fails due to 'int' vs. 'long' issue with i386. Modified: cfe/trunk/test/Sema/warn-bad-function-cast.c Modified:

Re: [cfe-commits] r161650 - in /cfe/trunk: include/clang/Frontend/VerifyDiagnosticConsumer.h lib/ARCMigrate/ARCMT.cpp lib/Frontend/VerifyDiagnosticConsumer.cpp test/ARCMT/verify.m test/ASTMerge/functi

2012-08-17 Thread Andy Gibbs
On Friday, August 17, 2012 7:01 PM, Jordan Rose wrote: On Aug 17, 2012, at 8:15 , Andy Gibbs wrote: On Thursday, August 16, 2012 8:12 PM, Jordan Rose wrote: On Aug 16, 2012, at 11:00 , Andy Gibbs wrote: ---When we get a diagnostic--- if (is a macro expansion) ignore [[big culprit this one!]]

Re: [cfe-commits] Plumbing through some MIPS options

2012-08-17 Thread Eli Friedman
On Fri, Aug 17, 2012 at 1:08 PM, Carl Norum c...@lytro.com wrote: Over in this thread on the llvm-dev list: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052574.html It was suggested that I file bugs about having to pass some MIPS-specific flags through via -Xclang and

Re: [cfe-commits] Plumbing through some MIPS options

2012-08-17 Thread Hatanaka, Akira
(These are my personal opinions) Turning on -enable-mips-delay-filler by default (in MipsDelaySlotFiller.cpp) or turning it on when compiling with -O3 is better. I don't think it should be exposed as a command line option. We have been planning to change this for a while, but haven't done so.

Re: [cfe-commits] Plumbing through some MIPS options

2012-08-17 Thread Eli Friedman
On Fri, Aug 17, 2012 at 2:16 PM, Hatanaka, Akira ahatan...@mips.com wrote: (These are my personal opinions) Turning on -enable-mips-delay-filler by default (in MipsDelaySlotFiller.cpp) or turning it on when compiling with -O3 is better. I don't think it should be exposed as a command line

[cfe-commits] r162132 - in /cfe/trunk/lib/Sema: CMakeLists.txt SemaStmt.cpp SemaStmtAsm.cpp

2012-08-17 Thread Chad Rosier
Author: mcrosier Date: Fri Aug 17 16:19:40 2012 New Revision: 162132 URL: http://llvm.org/viewvc/llvm-project?rev=162132view=rev Log: [ms-inline asm] Extract AsmStmt handling into a separate file, so as to not pollute SemaStmt with extraneous asm handling logic. Added:

[cfe-commits] r162133 - in /cfe/trunk: include/clang/AST/RecursiveASTVisitor.h unittests/Tooling/RecursiveASTVisitorTest.cpp unittests/Tooling/TestVisitor.h

2012-08-17 Thread Richard Smith
Author: rsmith Date: Fri Aug 17 16:23:17 2012 New Revision: 162133 URL: http://llvm.org/viewvc/llvm-project?rev=162133view=rev Log: Part of PR13618: visit the TypeLoc when RecursiveASTVisitor visits a CompoundLiteralExpr. Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h

Re: [cfe-commits] Plumbing through some MIPS options

2012-08-17 Thread Hatanaka, Akira
I believe this -G option is it: -G NUM allow referencing objects up to NUM bytes implicitly with the gp register [default 8] From: Eli Friedman [eli.fried...@gmail.com] Sent: Friday, August 17, 2012 2:20 PM

[cfe-commits] r162134 - /cfe/trunk/lib/Sema/SemaStmtAsm.cpp

2012-08-17 Thread Chad Rosier
Author: mcrosier Date: Fri Aug 17 16:27:25 2012 New Revision: 162134 URL: http://llvm.org/viewvc/llvm-project?rev=162134view=rev Log: [ms-inline asm] Update comment. Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp Modified: cfe/trunk/lib/Sema/SemaStmtAsm.cpp URL:

Re: [cfe-commits] [PATCH] CodeGen support for transparent_union

2012-08-17 Thread Eli Friedman
On Fri, Aug 10, 2012 at 2:41 AM, Stefan Kristiansson stefan.kristians...@saunalahti.fi wrote: On Fri, Aug 10, 2012 at 1:49 AM, Eli Friedman eli.fried...@gmail.com wrote: On Wed, Aug 8, 2012 at 11:52 PM, Stefan Kristiansson stefan.kristians...@saunalahti.fi wrote: Ping? Quick review:

[cfe-commits] r162138 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Sema/asm.c test/Sema/attr-used.c test/Sema/private-extern.c test/Sema/tentative-decls.c tes

2012-08-17 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Aug 17 16:44:55 2012 New Revision: 162138 URL: http://llvm.org/viewvc/llvm-project?rev=162138view=rev Log: c: privide deprecated warning when __private_extern__ storage specifier is unsed in a declaration; as it may not make the symbol local to linkage unit as

Re: [cfe-commits] r161972 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Sema/tentative-decls.c

2012-08-17 Thread jahanian
In r162138. Nick suggested making this a deprecated warning as we have standardized on using the hidden attribute. Message should be more clear now. I did not provide a fixit for this. This is because it would involve replacing the storage class specifier with the attribute and AFAIK, we don't

[cfe-commits] r162144 - /cfe/trunk/lib/Sema/Sema.cpp

2012-08-17 Thread Douglas Gregor
Author: dgregor Date: Fri Aug 17 17:17:36 2012 New Revision: 162144 URL: http://llvm.org/viewvc/llvm-project?rev=162144view=rev Log: When code completion is enabled, don't do any work in Sema::ActOnEndOfTranslationUnit(). This is a (minor) optimization. Modified: cfe/trunk/lib/Sema/Sema.cpp

Re: [cfe-commits] r161501 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp lib/Sema/S

2012-08-17 Thread Nico Weber
Should this really be on by default? On chrome, this triggers a single time (linux-only): ../../third_party/tcmalloc/chromium/src/stack_trace_table.cc:138:16: warning: expression which evaluates to zero treated as a null pointer constant of type 'void *' [-Wnon-literal-null-conversion]

Re: [cfe-commits] r161501 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp lib/Sema/S

2012-08-17 Thread David Blaikie
On Fri, Aug 17, 2012 at 3:33 PM, Nico Weber tha...@chromium.org wrote: Should this really be on by default? On chrome, this triggers a single time (linux-only): ../../third_party/tcmalloc/chromium/src/stack_trace_table.cc:138:16: warning: expression which evaluates to zero treated as a null

Re: [cfe-commits] r161501 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp lib/Sema/S

2012-08-17 Thread Jordan Rose
On Aug 17, 2012, at 15:43 , David Blaikie dblai...@gmail.com wrote: On Fri, Aug 17, 2012 at 3:33 PM, Nico Weber tha...@chromium.org wrote: Should this really be on by default? On chrome, this triggers a single time (linux-only):

[cfe-commits] r162145 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

2012-08-17 Thread Eric Christopher
Author: echristo Date: Fri Aug 17 17:54:57 2012 New Revision: 162145 URL: http://llvm.org/viewvc/llvm-project?rev=162145view=rev Log: Reapply: Make isa part of objc_object at metadata generation time. Noticed on inspection. Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Modified:

Re: [cfe-commits] r161501 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp lib/Sema/S

2012-08-17 Thread Nico Weber
On Fri, Aug 17, 2012 at 3:54 PM, Jordan Rose jordan_r...@apple.com wrote: On Aug 17, 2012, at 15:43 , David Blaikie dblai...@gmail.com wrote: On Fri, Aug 17, 2012 at 3:33 PM, Nico Weber tha...@chromium.org wrote: Should this really be on by default? On chrome, this triggers a single time

Re: [cfe-commits] Plumbing through some MIPS options

2012-08-17 Thread Hatanaka, Akira
Could you rename the option to disable-mips-delay-filler (false by default)? From: Carl Norum [c...@lytro.com] Sent: Friday, August 17, 2012 4:00 PM To: Hatanaka, Akira Cc: Eli Friedman; cfe-commits Subject: Re: [cfe-commits] Plumbing through some MIPS

Re: [cfe-commits] r161972 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Sema/tentative-decls.c

2012-08-17 Thread Ted Kremenek
Ok, this makes sense to message this as an old syntax that is deprecated, with the old syntax having unintended behavior in some cases. On Aug 17, 2012, at 2:51 PM, jahanian fjahan...@apple.com wrote: In r162138. Nick suggested making this a deprecated warning as we have standardized on

Re: [cfe-commits] Plumbing through some MIPS options

2012-08-17 Thread Carl Norum
Sure, easily done. -- Carl On Aug 17, 2012, at 4:18 PM, Hatanaka, Akira wrote: Could you rename the option to disable-mips-delay-filler (false by default)? From: Carl Norum [c...@lytro.com] Sent: Friday, August 17, 2012 4:00 PM To: Hatanaka,

[cfe-commits] r162153 - /cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp

2012-08-17 Thread Dmitri Gribenko
Author: gribozavr Date: Fri Aug 17 19:29:27 2012 New Revision: 162153 URL: http://llvm.org/viewvc/llvm-project?rev=162153view=rev Log: AST Matchers tests: test that member() matches member allocation functions. Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp Modified:

[cfe-commits] r162154 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h lib/StaticAnalyzer/Core/ExplodedGraph.cpp

2012-08-17 Thread Jordan Rose
Author: jrose Date: Fri Aug 17 19:30:10 2012 New Revision: 162154 URL: http://llvm.org/viewvc/llvm-project?rev=162154view=rev Log: [analyzer] Use PointerUnion to implement ExplodedNode::NodeGroup. We shouldn't be reinventing our own wheels. This also paves the way for marking different kinds of

[cfe-commits] r162156 - in /cfe/trunk: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/exceptions.mm

2012-08-17 Thread Jordan Rose
Author: jrose Date: Fri Aug 17 19:30:20 2012 New Revision: 162156 URL: http://llvm.org/viewvc/llvm-project?rev=162156view=rev Log: [analyzer] Treat @throw as a sink (stop processing). The CFG approximates @throw as a return statement, but that's not good enough in inlined functions. Moreover,

[cfe-commits] r162155 - /cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp

2012-08-17 Thread Jordan Rose
Author: jrose Date: Fri Aug 17 19:30:16 2012 New Revision: 162155 URL: http://llvm.org/viewvc/llvm-project?rev=162155view=rev Log: [analyzer] Remove obsolete GenericNodeBuilderRefCount from RetainCountChecker. This was once an adapter class between callbacks that had CheckerContexts and those

[cfe-commits] r162157 - in /cfe/trunk: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/exceptions.mm test/Analysis/misc-ps-region-store.cpp

2012-08-17 Thread Jordan Rose
Author: jrose Date: Fri Aug 17 19:30:23 2012 New Revision: 162157 URL: http://llvm.org/viewvc/llvm-project?rev=162157view=rev Log: [analyzer] Treat C++ 'throw' as a sink. Our current handling of 'throw' is all CFG-based: it jumps to a 'catch' block if there is one and the function exit block if

[cfe-commits] r162158 - /cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.cpp

2012-08-17 Thread Dmitri Gribenko
Author: gribozavr Date: Fri Aug 17 19:41:04 2012 New Revision: 162158 URL: http://llvm.org/viewvc/llvm-project?rev=162158view=rev Log: AST Matchers tests: test that member() matches member allocation functions: declare size_t in system-independent way. Modified:

[cfe-commits] [PATCH] Terse output mode for DeclPrinter and lots of tests

2012-08-17 Thread Dmitri Gribenko
Hello, The attached patch adds a flag PrintingPolicy::DontRecurseInDeclContext to provide terse output from DeclPrinter. The motivation is to use DeclPrinter to print declarations in user-friendly format, without overwhelming user with inner detail of the declaration being printed. This patch

[cfe-commits] r162159 - in /cfe/trunk: include/clang/Lex/ include/clang/Parse/ include/clang/Sema/ lib/Parse/ lib/Sema/ test/Parser/ test/SemaCXX/ test/SemaTemplate/

2012-08-17 Thread Richard Smith
Author: rsmith Date: Fri Aug 17 19:55:03 2012 New Revision: 162159 URL: http://llvm.org/viewvc/llvm-project?rev=162159view=rev Log: PR4, PR5925, PR13210: Teach tentative parsing to annotate identifiers and nested names as id-expressions, using the annot_primary_expr annotation, where

Re: [cfe-commits] r161650 - in /cfe/trunk: include/clang/Frontend/VerifyDiagnosticConsumer.h lib/ARCMigrate/ARCMT.cpp lib/Frontend/VerifyDiagnosticConsumer.cpp test/ARCMT/verify.m test/ASTMerge/functi

2012-08-17 Thread Jordan Rose
On Aug 17, 2012, at 13:32 , Andy Gibbs andyg1...@hotmail.co.uk wrote: Why not look at where the macro is instantiated? Is it necessary? A macro expansion itself will not contain comments, and hence no directive?... (that's right isn't it?) I'll agree that directives should not come from

Re: [cfe-commits] r162156 - in /cfe/trunk: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/exceptions.mm

2012-08-17 Thread Anna Zaks
On Aug 17, 2012, at 5:30 PM, Jordan Rose wrote: Author: jrose Date: Fri Aug 17 19:30:20 2012 New Revision: 162156 URL: http://llvm.org/viewvc/llvm-project?rev=162156view=rev Log: [analyzer] Treat @throw as a sink (stop processing). The CFG approximates @throw as a return statement,

Re: [cfe-commits] r162156 - in /cfe/trunk: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/exceptions.mm

2012-08-17 Thread Jordan Rose
On Aug 17, 2012, at 19:15 , Anna Zaks ga...@apple.com wrote: On Aug 17, 2012, at 5:30 PM, Jordan Rose wrote: Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp URL:

Re: [cfe-commits] [Patch] -Wduplicate-enum which fixes PR6343

2012-08-17 Thread Ted Kremenek
On Aug 15, 2012, at 6:12 PM, Richard Trieu rtr...@google.com wrote: On Tue, Aug 14, 2012 at 9:48 PM, Ted Kremenek kreme...@apple.com wrote: On Aug 14, 2012, at 2:32 PM, Richard Trieu rtr...@google.com wrote: At a high level, I honestly find this logic to be more complicated than I would

[cfe-commits] r162163 - in /cfe/trunk: lib/AST/ItaniumMangle.cpp test/CodeGenCXX/mangle-template.cpp

2012-08-17 Thread John McCall
Author: rjmccall Date: Fri Aug 17 23:51:52 2012 New Revision: 162163 URL: http://llvm.org/viewvc/llvm-project?rev=162163view=rev Log: When mangling a negative number, remember that negating it does not always yield a positive number. Just print the negated result as an unsigned number.

Re: [cfe-commits] [Patch] -Wduplicate-enum which fixes PR6343

2012-08-17 Thread Ted Kremenek
BTW, I wrote this two days ago. For some reason my mail client didn't send it out until now. My apologies for the delay. On Aug 15, 2012, at 10:11 PM, Ted Kremenek kreme...@apple.com wrote: On Aug 15, 2012, at 6:12 PM, Richard Trieu rtr...@google.com wrote: On Tue, Aug 14, 2012 at 9:48

Re: [cfe-commits] r161501 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp lib/Sema/S

2012-08-17 Thread James Dennett
On Fri, Aug 17, 2012 at 4:00 PM, Nico Weber tha...@chromium.org wrote: On Fri, Aug 17, 2012 at 3:54 PM, Jordan Rose jordan_r...@apple.com wrote: On Aug 17, 2012, at 15:43 , David Blaikie dblai...@gmail.com wrote: On Fri, Aug 17, 2012 at 3:33 PM, Nico Weber tha...@chromium.org wrote: Should