Re: [cfe-commits] [PATCH 2/2] [clang.py] Implement Token API

2012-06-29 Thread Gregory Szorc
Updated patch attached. * Added Cursor.get_tokens() * Refactored TokenGroup out of TranslationUnit to support above * Refactored with TranslationUnit.get_* API changes from last patch. On Fri, Jun 29, 2012 at 12:18 AM, Gregory Szorc wrote: > This exposes all of libclang's token functions in the

Re: [cfe-commits] [PATCH 1/2] [clang.py] Add TranslationUnit.get_{file, source_location, source_range}

2012-06-29 Thread Gregory Szorc
Updated patch. On Fri, Jun 29, 2012 at 8:47 AM, Gregory Szorc wrote: > Having thought about this in my sleep, I may want to rescind this > review request and refactor things a little. > > 1) I may change "range" and "source_range" names to "extent" since > that is what is used elsewhere. > 2) I m

[cfe-commits] r159478 - /cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

2012-06-29 Thread Matt Beaumont-Gay
Author: matthewbg Date: Fri Jun 29 20:37:38 2012 New Revision: 159478 URL: http://llvm.org/viewvc/llvm-project?rev=159478&view=rev Log: Add a missing argument index, wordsmith a little, and 80(ish) columns Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/inc

[cfe-commits] r159477 - in /cfe/trunk: lib/AST/ASTContext.cpp test/CodeGen/block-3.c

2012-06-29 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Jun 29 19:48:59 2012 New Revision: 159477 URL: http://llvm.org/viewvc/llvm-project?rev=159477&view=rev Log: blocks: fixes a crash when encoding block type with argument type of size 0. // rdar://11777609 PR13229. Modified: cfe/trunk/lib/AST/ASTContext.cpp cfe/t

[cfe-commits] r159476 - /cfe/trunk/test/Driver/crash-report.c

2012-06-29 Thread NAKAMURA Takumi
Author: chapuni Date: Fri Jun 29 19:29:03 2012 New Revision: 159476 URL: http://llvm.org/viewvc/llvm-project?rev=159476&view=rev Log: test/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. Investigating. Modified: cfe/trunk/test/Driver/crash-report.c Modified: cfe/trunk/test/

Re: [cfe-commits] r159475 - /cfe/trunk/test/Rewriter/objc-modern-container-subscript.mm

2012-06-29 Thread Fariborz Jahanian
On Jun 29, 2012, at 4:57 PM, Chandler Carruth wrote: > You can actually #include for this -- it's specifically allowed as > it ships as part of Clang. Good point. In this case, a local definition of size_t suffices. I mistakenly replaced it with string.h while working on a patch and forgot to

Re: [cfe-commits] r159475 - /cfe/trunk/test/Rewriter/objc-modern-container-subscript.mm

2012-06-29 Thread Chandler Carruth
You can actually #include for this -- it's specifically allowed as it ships as part of Clang. On Fri, Jun 29, 2012 at 4:48 PM, Fariborz Jahanian wrote: > Author: fjahanian > Date: Fri Jun 29 18:48:43 2012 > New Revision: 159475 > > URL: http://llvm.org/viewvc/llvm-project?rev=159475&view=rev >

Re: [cfe-commits] r159445 - in /cfe/trunk: lib/Rewrite/RewriteModernObjC.cpp test/Rewriter/objc-modern-StretAPI.mm test/Rewriter/objc-modern-container-subscript.mm

2012-06-29 Thread Fariborz Jahanian
Fixed in r159475. - fariborz On Jun 29, 2012, at 4:28 PM, Rafael Espíndola wrote: >> +#include > > This is failing for me: > > > /home/espindola/llvm/clang/test/Rewriter/objc-modern-container-subscript.mm:5:10: > fatal error: 'string.h' file not found > #include > ^ > 1 error generat

[cfe-commits] r159475 - /cfe/trunk/test/Rewriter/objc-modern-container-subscript.mm

2012-06-29 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Jun 29 18:48:43 2012 New Revision: 159475 URL: http://llvm.org/viewvc/llvm-project?rev=159475&view=rev Log: Remove dependency on string.h Modified: cfe/trunk/test/Rewriter/objc-modern-container-subscript.mm Modified: cfe/trunk/test/Rewriter/objc-modern-container-

Re: [cfe-commits] r159445 - in /cfe/trunk: lib/Rewrite/RewriteModernObjC.cpp test/Rewriter/objc-modern-StretAPI.mm test/Rewriter/objc-modern-container-subscript.mm

2012-06-29 Thread Chandler Carruth
The regression test suite should be freestanding, so the fix is to avoid relying on a libc header. On Fri, Jun 29, 2012 at 4:28 PM, Rafael Espíndola < rafael.espind...@gmail.com> wrote: > > +#include > > This is failing for me: > > > > /home/espindola/llvm/clang/test/Rewriter/objc-modern-contai

Re: [cfe-commits] r159464 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/typo-correction.cpp

2012-06-29 Thread Kaelyn Uhrain
On Fri, Jun 29, 2012 at 2:36 PM, David Blaikie wrote: > On Fri, Jun 29, 2012 at 2:30 PM, Kaelyn Uhrain wrote: > > Author: rikka > > Date: Fri Jun 29 16:30:39 2012 > > New Revision: 159464 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=159464&view=rev > > Log: > > In Sema::ClassifyName, try

Re: [cfe-commits] r159445 - in /cfe/trunk: lib/Rewrite/RewriteModernObjC.cpp test/Rewriter/objc-modern-StretAPI.mm test/Rewriter/objc-modern-container-subscript.mm

2012-06-29 Thread Rafael Espíndola
> +#include This is failing for me: /home/espindola/llvm/clang/test/Rewriter/objc-modern-container-subscript.mm:5:10: fatal error: 'string.h' file not found #include ^ 1 error generated. ___ cfe-commits mailing list cfe-commits@cs.uiuc.edu h

Re: [cfe-commits] r159469 - in /cfe/trunk: include/clang/Basic/TokenKinds.def include/clang/Driver/Compilation.h include/clang/Driver/Types.def lib/Driver/Driver.cpp lib/Lex/Pragma.cpp lib/Parse/Parse

2012-06-29 Thread David Blaikie
On Fri, Jun 29, 2012 at 3:55 PM, David Dean wrote: > The test case is failing: Ah, sorry about that - I'm not entirely sure where the 'clangfoo:' suffix comes from, so I've {{.*}} to skip over it entirely (rather than trying to ensure 'clang' is a prefix or anything like that) in r159474. - Davi

[cfe-commits] r159474 - /cfe/trunk/test/Driver/crash-report.c

2012-06-29 Thread David Blaikie
Author: dblaikie Date: Fri Jun 29 18:16:06 2012 New Revision: 159474 URL: http://llvm.org/viewvc/llvm-project?rev=159474&view=rev Log: Unbreak the test from r159469. Modified: cfe/trunk/test/Driver/crash-report.c Modified: cfe/trunk/test/Driver/crash-report.c URL: http://llvm.org/viewvc/llv

[cfe-commits] r159473 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/Misc/diag-template-diffing-color.cpp test/Misc/diag-template-diffing.cpp

2012-06-29 Thread Richard Trieu
Author: rtrieu Date: Fri Jun 29 18:11:10 2012 New Revision: 159473 URL: http://llvm.org/viewvc/llvm-project?rev=159473&view=rev Log: Fix typos from r159463 and update tests. Added Matt Beaumont-Gay's suggestion to improve wording of a diagnostic message. Modified: cfe/trunk/include/clang/Bas

Re: [cfe-commits] r159463 - in /cfe/trunk: docs/InternalsManual.html include/clang/Basic/DiagnosticSemaKinds.td lib/Basic/Diagnostic.cpp test/Misc/diag-template-diffing-color.cpp

2012-06-29 Thread Richard Trieu
On Fri, Jun 29, 2012 at 3:22 PM, Matt Beaumont-Gay wrote: > Nice; copy-editing inline. > > On Fri, Jun 29, 2012 at 2:12 PM, Richard Trieu wrote: > > Author: rtrieu > > Date: Fri Jun 29 16:12:16 2012 > > New Revision: 159463 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=159463&view=rev > >

[cfe-commits] r159472 - in /cfe/trunk: lib/AST/ASTContext.cpp test/CodeGenObjC/encode-test-6.m

2012-06-29 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Jun 29 17:54:56 2012 New Revision: 159472 URL: http://llvm.org/viewvc/llvm-project?rev=159472&view=rev Log: objective-c IRGen: fixes a crash when method type is being mangled when an argument type size is 0. // rdar://11777609, PR13229 Added: cfe/trunk/test/CodeGen

Re: [cfe-commits] r159469 - in /cfe/trunk: include/clang/Basic/TokenKinds.def include/clang/Driver/Compilation.h include/clang/Driver/Types.def lib/Driver/Driver.cpp lib/Lex/Pragma.cpp lib/Parse/Parse

2012-06-29 Thread David Dean
The test case is failing: TEST 'Clang :: Driver/crash-report.c' FAILED Script: -- /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-nobootstrap-RA/clang-build/Release+Asserts/bin/clang -fsyntax-only /Users/buildslave/zorg/b

Re: [cfe-commits] r158899 - in /cfe/trunk: lib/Sema/SemaStmt.cpp test/SemaObjC/blocks.m

2012-06-29 Thread Jordan Rose
On Jun 29, 2012, at 11:22 , Douglas Gregor wrote: > > On Jun 20, 2012, at 10:54 PM, Jordan Rose wrote: > >> Author: jrose >> Date: Thu Jun 21 00:54:55 2012 >> New Revision: 158899 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=158899&view=rev >> Log: >> Pretend that enum constants have e

Re: [cfe-commits] r159463 - in /cfe/trunk: docs/InternalsManual.html include/clang/Basic/DiagnosticSemaKinds.td lib/Basic/Diagnostic.cpp test/Misc/diag-template-diffing-color.cpp

2012-06-29 Thread Matt Beaumont-Gay
Nice; copy-editing inline. On Fri, Jun 29, 2012 at 2:12 PM, Richard Trieu wrote: > Author: rtrieu > Date: Fri Jun 29 16:12:16 2012 > New Revision: 159463 > > URL: http://llvm.org/viewvc/llvm-project?rev=159463&view=rev > Log: > Update the %diff modifer to have an alternate string print when a tem

Re: [cfe-commits] [patch] rewrite-includes crash support

2012-06-29 Thread David Blaikie
On Fri, Jun 29, 2012 at 2:55 PM, Chandler Carruth wrote: > Thanks for poking! > > diff --git lib/Lex/Pragma.cpp lib/Lex/Pragma.cpp > index 7b94d26..c9cc4ad 100644 > --- lib/Lex/Pragma.cpp > +++ lib/Lex/Pragma.cpp > @@ -1010,6 +1010,10 @@ struct PragmaDebugHandler : public PragmaHandler { >        

[cfe-commits] r159469 - in /cfe/trunk: include/clang/Basic/TokenKinds.def include/clang/Driver/Compilation.h include/clang/Driver/Types.def lib/Driver/Driver.cpp lib/Lex/Pragma.cpp lib/Parse/ParseDecl

2012-06-29 Thread David Blaikie
Author: dblaikie Date: Fri Jun 29 17:03:56 2012 New Revision: 159469 URL: http://llvm.org/viewvc/llvm-project?rev=159469&view=rev Log: Use -frewrite-includes for crash reports. In future changes we should: * use __builtin_trap rather than derefing 'random' volatile pointers. * avoid dumping tempo

Re: [cfe-commits] [patch] rewrite-includes crash support

2012-06-29 Thread Chandler Carruth
Thanks for poking! diff --git lib/Lex/Pragma.cpp lib/Lex/Pragma.cpp index 7b94d26..c9cc4ad 100644 --- lib/Lex/Pragma.cpp +++ lib/Lex/Pragma.cpp @@ -1010,6 +1010,10 @@ struct PragmaDebugHandler : public PragmaHandler { llvm_unreachable("This is an assertion!"); } else if (II->isStr("cra

Re: [cfe-commits] [PATCH] Fix crash-on-invalid when passing 128-bit integers to attributes that expect ICEs

2012-06-29 Thread Douglas Gregor
On Jun 15, 2012, at 10:58 AM, Dmitri Gribenko wrote: > Now with a patch. Excuse me for the noise. > > On Fri, Jun 15, 2012 at 10:55 AM, Dmitri Gribenko wrote: >> Hello, >> >> The attached patch fixes crash-on-invalid when passing 128-bit >> integers to attributes that expect ICEs, for exampl

Re: [cfe-commits] r159464 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/typo-correction.cpp

2012-06-29 Thread Jordan Rose
On Jun 29, 2012, at 14:43 , Chandler Carruth wrote: > Wow, recovering as 'auto x = y;' would be amazing > ___ Wow, recovering as 'auto x = y;' would be JavaScript. ;-) ___ cfe-commits mailing list cfe-

Re: [cfe-commits] r159464 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/typo-correction.cpp

2012-06-29 Thread Chandler Carruth
Wow, recovering as 'auto x = y;' would be amazing ___ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Re: [cfe-commits] [patch] rewrite-includes crash support

2012-06-29 Thread David Blaikie
*vigorous ping* On Wed, Jun 27, 2012 at 10:10 AM, David Blaikie wrote: > On Tue, Jun 26, 2012 at 2:09 PM, Eli Friedman wrote: >> On Tue, Jun 26, 2012 at 1:54 PM, David Blaikie wrote: >>> On Fri, Jun 22, 2012 at 4:50 PM, Chandler Carruth >>> wrote: Doh, sorry for missing this last patch.

Re: [cfe-commits] [Patch] Minor updates to template type diffing

2012-06-29 Thread Chandler Carruth
Just to be clear, I discussed this with richard in person. I should have put my review comments on the mailing list, sorry for that. Don't want folks to think this went it without discussion first. It's my fault. =/ On Fri, Jun 29, 2012 at 2:15 PM, Richard Trieu wrote: > On Thu, Jun 28, 2012 at

Re: [cfe-commits] r159464 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/typo-correction.cpp

2012-06-29 Thread David Blaikie
On Fri, Jun 29, 2012 at 2:30 PM, Kaelyn Uhrain wrote: > Author: rikka > Date: Fri Jun 29 16:30:39 2012 > New Revision: 159464 > > URL: http://llvm.org/viewvc/llvm-project?rev=159464&view=rev > Log: > In Sema::ClassifyName, try to avoid nonsensical corrections to > keywords when doing type correcti

[cfe-commits] Compiler-rt changes for detecting initialization order problems in Address Sanitizer

2012-06-29 Thread Reid Watson
Hello, I've attached a patch to add basic support for detecting problems with initialization order in C++ to AddressSanitizer. This patch relies on changes to the instrumentation pass, and I've sent a patch for this to LLVM. This is definitely a first draft, and it leans toward false positives (fu

Re: [cfe-commits] [PATCH] AST matchers

2012-06-29 Thread Douglas Gregor
On Jun 29, 2012, at 2:33 PM, David Blaikie wrote: > On Fri, Jun 29, 2012 at 2:30 PM, Douglas Gregor wrote: >> >> On Jun 29, 2012, at 2:29 PM, David Blaikie wrote: >> >>> On Fri, Jun 29, 2012 at 2:05 PM, Manuel Klimek wrote: On Fri, Jun 29, 2012 at 10:40 PM, Douglas Gregor wrote: >

Re: [cfe-commits] [PATCH] AST matchers

2012-06-29 Thread David Blaikie
On Fri, Jun 29, 2012 at 2:30 PM, Douglas Gregor wrote: > > On Jun 29, 2012, at 2:29 PM, David Blaikie wrote: > >> On Fri, Jun 29, 2012 at 2:05 PM, Manuel Klimek wrote: >>> On Fri, Jun 29, 2012 at 10:40 PM, Douglas Gregor wrote: CamelCase is fine for these. I notice that there's some i

[cfe-commits] r159464 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/typo-correction.cpp

2012-06-29 Thread Kaelyn Uhrain
Author: rikka Date: Fri Jun 29 16:30:39 2012 New Revision: 159464 URL: http://llvm.org/viewvc/llvm-project?rev=159464&view=rev Log: In Sema::ClassifyName, try to avoid nonsensical corrections to keywords when doing type correction. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp cfe/trunk/test/

Re: [cfe-commits] [PATCH] AST matchers

2012-06-29 Thread Douglas Gregor
On Jun 29, 2012, at 2:29 PM, David Blaikie wrote: > On Fri, Jun 29, 2012 at 2:05 PM, Manuel Klimek wrote: >> On Fri, Jun 29, 2012 at 10:40 PM, Douglas Gregor wrote: >>> >>> CamelCase is fine for these. I notice that there's some inconsistency with >>> 'has' names, e.g., hasDescendant vs. HasT

Re: [cfe-commits] [PATCH] AST matchers

2012-06-29 Thread David Blaikie
On Fri, Jun 29, 2012 at 2:05 PM, Manuel Klimek wrote: > On Fri, Jun 29, 2012 at 10:40 PM, Douglas Gregor wrote: >> >> CamelCase is fine for these. I notice that there's some inconsistency with >> 'has' names, e.g., hasDescendant vs. HasType. > > > Update: Chandler voted for using llvm coding styl

Re: [cfe-commits] [Patch] Minor updates to template type diffing

2012-06-29 Thread Richard Trieu
On Thu, Jun 28, 2012 at 8:09 PM, Richard Trieu wrote: > A few changes to template type diffing. Originally, the format was > %diff{type is | not | }1,2 but this does not allow enough flexibility for > diagnostic messages. The new format is %diff{type is $ not $ |see type > tree}1,2. The text b

[cfe-commits] r159463 - in /cfe/trunk: docs/InternalsManual.html include/clang/Basic/DiagnosticSemaKinds.td lib/Basic/Diagnostic.cpp test/Misc/diag-template-diffing-color.cpp

2012-06-29 Thread Richard Trieu
Author: rtrieu Date: Fri Jun 29 16:12:16 2012 New Revision: 159463 URL: http://llvm.org/viewvc/llvm-project?rev=159463&view=rev Log: Update the %diff modifer to have an alternate string print when a template tree is selected. This will allow more flexibility when converting diagnostics to use tem

Re: [cfe-commits] [PATCH] AST matchers

2012-06-29 Thread Douglas Gregor
On Jun 29, 2012, at 2:05 PM, Manuel Klimek wrote: > On Fri, Jun 29, 2012 at 10:40 PM, Douglas Gregor wrote: > CamelCase is fine for these. I notice that there's some inconsistency with > 'has' names, e.g., hasDescendant vs. HasType. > > Update: Chandler voted for using llvm coding style (and

Re: [cfe-commits] [PATCH] AST matchers

2012-06-29 Thread Manuel Klimek
On Fri, Jun 29, 2012 at 10:40 PM, Douglas Gregor wrote: > CamelCase is fine for these. I notice that there's some inconsistency with > 'has' names, e.g., hasDescendant vs. HasType. > Update: Chandler voted for using llvm coding style (and I agree). The argument is that the callable classes we ha

[cfe-commits] r159462 - /cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

2012-06-29 Thread Ted Kremenek
Author: kremenek Date: Fri Jun 29 16:01:35 2012 New Revision: 159462 URL: http://llvm.org/viewvc/llvm-project?rev=159462&view=rev Log: Revert "Tweak insecureAPI analyzer checks to have the ability to be individually disabled." Jordan Rose corrected me that this actually isn't needed. Modified:

Re: [cfe-commits] [PATCH] AST matchers

2012-06-29 Thread Manuel Klimek
On Fri, Jun 29, 2012 at 10:40 PM, Douglas Gregor wrote: > > On Jun 15, 2012, at 5:49 AM, Manuel Klimek wrote: > > ... one of the final pieces that we have in the tooling branch are the AST > matchers. > > The main user interface is in ASTMatchers.h and ASTMatchFinder.h. > > Note that the AST mat

[cfe-commits] r159459 - /cfe/trunk/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

2012-06-29 Thread Ted Kremenek
Author: kremenek Date: Fri Jun 29 15:44:58 2012 New Revision: 159459 URL: http://llvm.org/viewvc/llvm-project?rev=159459&view=rev Log: Tweak insecureAPI analyzer checks to have the ability to be individually disabled. The solution is a bit inefficient: it creates N checkers, one for each check,

Re: [cfe-commits] [PATCH] AST matchers

2012-06-29 Thread Douglas Gregor
On Jun 15, 2012, at 5:49 AM, Manuel Klimek wrote: > ... one of the final pieces that we have in the tooling branch are the AST > matchers. > > The main user interface is in ASTMatchers.h and ASTMatchFinder.h. > > Note that the AST matchers are completely independent of the tooling > framewor

Re: [cfe-commits] [Patch] -Wunique-enum fixit hint

2012-06-29 Thread Richard Trieu
Committed r159458. On Fri, Jun 29, 2012 at 11:34 AM, Douglas Gregor wrote: > LGTM! > > - Doug > > On Jun 20, 2012, at 11:44 AM, Richard Trieu wrote: > > Following a suggestion from Erik Verbruggen, added a note to the unique > enum warning with a fixit hint to set the final element to equal the

[cfe-commits] r159458 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaCXX/warn-unique-enum.cpp

2012-06-29 Thread Richard Trieu
Author: rtrieu Date: Fri Jun 29 15:36:14 2012 New Revision: 159458 URL: http://llvm.org/viewvc/llvm-project?rev=159458&view=rev Log: Add a fix-it hint note to -Wunique-enum to suggest that the last element gets initialized with the next to last element to silence the warning. Modified: cfe/tr

[cfe-commits] r159456 - in /cfe/trunk: lib/Rewrite/RewriteModernObjC.cpp test/Rewriter/objc-modern-StretAPI.mm

2012-06-29 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Jun 29 14:55:46 2012 New Revision: 159456 URL: http://llvm.org/viewvc/llvm-project?rev=159456&view=rev Log: objective-c modern translator: synthesize argument type correctly for blocks and function pointer arguments in the written constructor. // rdar://11359268 Modif

Re: [cfe-commits] [PATCH] PR4111, PR5925, PR13210: Make tentative parsing smarter in the presence of undeclared identifiers

2012-06-29 Thread Richard Smith
On Fri, Jun 29, 2012 at 11:46 AM, Sean Silva wrote: > + case ANK_TentativeDecl: > + case ANK_TemplateName: > +// These two shouldn't happen. > + case ANK_Unresolved: > break; > > assert? > Sorry, I forgot to update that comment after some refactoring. The second ca

[cfe-commits] PATCH: Factor the CMake lit testsuite formation into common helper routines

2012-06-29 Thread Chandler Carruth
Hello, This pair of patches factors the CMake code for building lit testsuites into LLVM's CMake support modules. The LLVM side is very safe, so I'm not worried about it, however the Clang side has a tricky aspect to it. Because we have a standalone build, it has to do some custom logic to find l

Re: [cfe-commits] r159448 - /cfe/trunk/lib/Headers/stddef.h

2012-06-29 Thread Douglas Gregor
Go for it! Sent from my iPhone On Jun 29, 2012, at 12:24 PM, Nico Weber wrote: > Cool! I think this was the last thing blocking us from enabling > std=c++11 by default in microsoft mode -- should we do this now? > > Nico > > On Fri, Jun 29, 2012 at 11:28 AM, Douglas Gregor wrote: >> Author:

[cfe-commits] r159454 - /cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp

2012-06-29 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Jun 29 14:33:05 2012 New Revision: 159454 URL: http://llvm.org/viewvc/llvm-project?rev=159454&view=rev Log: modern objc translator: string.h is unavailable on some non-OSX platforms declare memset in rewritten code instead. Modified: cfe/trunk/lib/Rewrite/RewriteMo

Re: [cfe-commits] [patch] Trying to fix __va_list_tag serialization issue (bug 13189)

2012-06-29 Thread Jean-Daniel Dupas
Le 29 juin 2012 à 19:31, Meador Inge a écrit : > > On Jun 29, 2012, at 12:20 PM, Douglas Gregor wrote: > >> >> On Jun 29, 2012, at 8:07 AM, Jean-Daniel Dupas >> wrote: >> >>> >>> Le 29 juin 2012 à 16:58, Meador Inge a écrit : >>> On Jun 29, 2012, at 1:49 AM, Jean-Daniel Dupas w

Re: [cfe-commits] r159448 - /cfe/trunk/lib/Headers/stddef.h

2012-06-29 Thread Nico Weber
Cool! I think this was the last thing blocking us from enabling std=c++11 by default in microsoft mode -- should we do this now? Nico On Fri, Jun 29, 2012 at 11:28 AM, Douglas Gregor wrote: > Author: dgregor > Date: Fri Jun 29 13:28:41 2012 > New Revision: 159448 > > URL: http://llvm.org/viewvc/

[cfe-commits] r159452 - /cfe/trunk/lib/Sema/SemaObjCProperty.cpp

2012-06-29 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Jun 29 14:05:11 2012 New Revision: 159452 URL: http://llvm.org/viewvc/llvm-project?rev=159452&view=rev Log: fix a typo in my last commit. I thought I recompiled, but apparently I did not. Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp Modified: cfe/trunk/lib/Se

Re: [cfe-commits] Review: Patch for handling C99 veridic macros when using precompiled headers

2012-06-29 Thread Filipe Cabecinhas
Thanks! Filipe On Friday, June 29, 2012 at 7:29 PM, Douglas Gregor wrote: > > On Jun 25, 2012, at 3:22 PM, Filipe Cabecinhas (mailto:fil...@filcab.net)> wrote: > > > Hi all, > > > > C99 variadic macros aren't working when we use precompiled headers (either > > that or I made several mi

Re: [cfe-commits] [PATCH] PR4111, PR5925, PR13210: Make tentative parsing smarter in the presence of undeclared identifiers

2012-06-29 Thread Sean Silva
+ case ANK_TentativeDecl: + case ANK_TemplateName: +// These two shouldn't happen. + case ANK_Unresolved: break; assert? --Sean Silva On Thu, Jun 28, 2012 at 1:49 PM, Richard Smith wrote: > Hi, > > The attached patch makes tentative parsing try harder when it see

Re: [cfe-commits] r158874 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaObjC/default-synthesize-2.m

2012-06-29 Thread jahanian
On Jun 29, 2012, at 11:31 AM, Douglas Gregor wrote: > > On Jun 20, 2012, at 4:33 PM, Fariborz Jahanian wrote: > >> Author: fjahanian >> Date: Wed Jun 20 18:33:16 2012 >> New Revision: 158874 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=158874&view=rev >> Log: >> objective-c: place quote

[cfe-commits] r159450 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaObjCProperty.cpp

2012-06-29 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Jun 29 13:43:30 2012 New Revision: 159450 URL: http://llvm.org/viewvc/llvm-project?rev=159450&view=rev Log: objc diagnostic: pass IdentifierInfo* to the diagnostic system to produce quotes instead of adding qoute to the test. Modified: cfe/trunk/include/clang/Basi

Re: [cfe-commits] r158940 - in /cfe/trunk: lib/AST/RawCommentList.cpp test/Index/Inputs/annotate-comments-preprocessor.h test/Index/annotate-comments-preprocessor.c

2012-06-29 Thread Douglas Gregor
On Jun 29, 2012, at 11:36 AM, Dmitri Gribenko wrote: > On Fri, Jun 29, 2012 at 11:24 AM, Douglas Gregor wrote: >> On Jun 29, 2012, at 11:18 AM, Dmitri Gribenko wrote: >>> On Fri, Jun 29, 2012 at 11:15 AM, Douglas Gregor wrote: On Jun 21, 2012, at 3:04 PM, Dmitri Gribenko wrote: > Au

Re: [cfe-commits] r158940 - in /cfe/trunk: lib/AST/RawCommentList.cpp test/Index/Inputs/annotate-comments-preprocessor.h test/Index/annotate-comments-preprocessor.c

2012-06-29 Thread Dmitri Gribenko
On Fri, Jun 29, 2012 at 11:24 AM, Douglas Gregor wrote: > On Jun 29, 2012, at 11:18 AM, Dmitri Gribenko wrote: >> On Fri, Jun 29, 2012 at 11:15 AM, Douglas Gregor wrote: >>> On Jun 21, 2012, at 3:04 PM, Dmitri Gribenko wrote: Author: gribozavr Date: Thu Jun 21 17:04:37 2012 New R

Re: [cfe-commits] [Patch] -Wunique-enum fixit hint

2012-06-29 Thread Douglas Gregor
LGTM! - Doug On Jun 20, 2012, at 11:44 AM, Richard Trieu wrote: > Following a suggestion from Erik Verbruggen, added a note to the unique enum > warning with a fixit hint to set the final element to equal the previous > element to silence the warning. > ___

Re: [cfe-commits] r158874 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaObjC/default-synthesize-2.m

2012-06-29 Thread Douglas Gregor
On Jun 20, 2012, at 4:33 PM, Fariborz Jahanian wrote: > Author: fjahanian > Date: Wed Jun 20 18:33:16 2012 > New Revision: 158874 > > URL: http://llvm.org/viewvc/llvm-project?rev=158874&view=rev > Log: > objective-c: place quotes around named items in a diagnostic. > // rdar://11671080 A sligh

Re: [cfe-commits] std::nullptr_t support in MS headers

2012-06-29 Thread Douglas Gregor
On Jun 22, 2012, at 7:23 PM, João Matos wrote: > Updated patch with some minor fixes. Looks good; committed as r159448. - Doug > On Sat, Jun 23, 2012 at 2:49 AM, João Matos wrote: >> Ping. >> >> On Wed, Jun 20, 2012 at 1:56 PM, João Matos wrote: >>> This patch defines nullptr_t in

[cfe-commits] r159448 - /cfe/trunk/lib/Headers/stddef.h

2012-06-29 Thread Douglas Gregor
Author: dgregor Date: Fri Jun 29 13:28:41 2012 New Revision: 159448 URL: http://llvm.org/viewvc/llvm-project?rev=159448&view=rev Log: std::nullptr_t support in MS headers, from João Matos. Modified: cfe/trunk/lib/Headers/stddef.h Modified: cfe/trunk/lib/Headers/stddef.h URL: http://llvm.org

Re: [cfe-commits] Review: Patch for handling C99 veridic macros when using precompiled headers

2012-06-29 Thread Douglas Gregor
On Jun 25, 2012, at 3:22 PM, Filipe Cabecinhas wrote: > Hi all, > > C99 variadic macros aren't working when we use precompiled headers (either > that or I made several mistakes when trying to use them). > > Attached is a patch with a test-case that is not working on current clang. > > I'm d

[cfe-commits] r159446 - in /cfe/trunk: lib/Lex/Preprocessor.cpp test/PCH/pch__VA_ARGS__.c test/PCH/pch__VA_ARGS__.h

2012-06-29 Thread Douglas Gregor
Author: dgregor Date: Fri Jun 29 13:27:59 2012 New Revision: 159446 URL: http://llvm.org/viewvc/llvm-project?rev=159446&view=rev Log: Patch for handling C99 veriadic macros when using precompiled headers, from Filipe Cabecinhas! Added: cfe/trunk/test/PCH/pch__VA_ARGS__.c cfe/trunk/test/PC

[cfe-commits] r159445 - in /cfe/trunk: lib/Rewrite/RewriteModernObjC.cpp test/Rewriter/objc-modern-StretAPI.mm test/Rewriter/objc-modern-container-subscript.mm

2012-06-29 Thread Fariborz Jahanian
Author: fjahanian Date: Fri Jun 29 13:27:08 2012 New Revision: 159445 URL: http://llvm.org/viewvc/llvm-project?rev=159445&view=rev Log: objective-c modern translator: Translation into objc_msgSend_stret entry point which requires nil check before calling objc_msgSend_stret. // rdar://11359268 - wi

Re: [cfe-commits] r158940 - in /cfe/trunk: lib/AST/RawCommentList.cpp test/Index/Inputs/annotate-comments-preprocessor.h test/Index/annotate-comments-preprocessor.c

2012-06-29 Thread Douglas Gregor
On Jun 29, 2012, at 11:18 AM, Dmitri Gribenko wrote: > On Fri, Jun 29, 2012 at 11:15 AM, Douglas Gregor wrote: >> On Jun 21, 2012, at 3:04 PM, Dmitri Gribenko wrote: >>> Author: gribozavr >>> Date: Thu Jun 21 17:04:37 2012 >>> New Revision: 158940 >>> >>> URL: http://llvm.org/viewvc/llvm-proj

Re: [cfe-commits] r158899 - in /cfe/trunk: lib/Sema/SemaStmt.cpp test/SemaObjC/blocks.m

2012-06-29 Thread Douglas Gregor
On Jun 20, 2012, at 10:54 PM, Jordan Rose wrote: > Author: jrose > Date: Thu Jun 21 00:54:55 2012 > New Revision: 158899 > > URL: http://llvm.org/viewvc/llvm-project?rev=158899&view=rev > Log: > Pretend that enum constants have enum type when inferring a block return type. > > In C, enum const

Re: [cfe-commits] r159309 - in /cfe/trunk: lib/AST/CommentBriefParser.cpp test/Index/annotate-comments.cpp

2012-06-29 Thread Dmitri Gribenko
On Fri, Jun 29, 2012 at 10:53 AM, Douglas Gregor wrote: > On Jun 27, 2012, at 5:01 PM, Dmitri Gribenko wrote: >> +      // Check if this command implicitly starts a new paragraph. >> +      if (Name == "param" || Name == "result" || Name == "return" || >> +          Name == "returns") { > > Pleas

[cfe-commits] r159444 - /cfe/trunk/lib/AST/CommentBriefParser.cpp

2012-06-29 Thread Dmitri Gribenko
Author: gribozavr Date: Fri Jun 29 13:19:20 2012 New Revision: 159444 URL: http://llvm.org/viewvc/llvm-project?rev=159444&view=rev Log: Factor out a check for block commands (that implicitly start a new paragraph) into a separate function. Modified: cfe/trunk/lib/AST/CommentBriefParser.cpp

Re: [cfe-commits] r158940 - in /cfe/trunk: lib/AST/RawCommentList.cpp test/Index/Inputs/annotate-comments-preprocessor.h test/Index/annotate-comments-preprocessor.c

2012-06-29 Thread Dmitri Gribenko
On Fri, Jun 29, 2012 at 11:15 AM, Douglas Gregor wrote: > On Jun 21, 2012, at 3:04 PM, Dmitri Gribenko wrote: >> Author: gribozavr >> Date: Thu Jun 21 17:04:37 2012 >> New Revision: 158940 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=158940&view=rev >> Log: >> Handle include directive with

Re: [cfe-commits] r158940 - in /cfe/trunk: lib/AST/RawCommentList.cpp test/Index/Inputs/annotate-comments-preprocessor.h test/Index/annotate-comments-preprocessor.c

2012-06-29 Thread Douglas Gregor
On Jun 21, 2012, at 3:04 PM, Dmitri Gribenko wrote: > Author: gribozavr > Date: Thu Jun 21 17:04:37 2012 > New Revision: 158940 > > URL: http://llvm.org/viewvc/llvm-project?rev=158940&view=rev > Log: > Handle include directive with comments. It turns out that in this case > comments are not c

Re: [cfe-commits] [patch] Avoid redundant error when redefining a function as deleted

2012-06-29 Thread David Blaikie
On Fri, Jun 29, 2012 at 10:56 AM, Douglas Gregor wrote: > > On Jun 27, 2012, at 11:10 AM, David Blaikie wrote: > >> void func() {} >> void func() = delete; >> >> currently produces two errors in Clang - the first says that you are >> redefining func, the second says that a deleted definition must

[cfe-commits] r159442 - in /cfe/trunk: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/deleted-function.cpp

2012-06-29 Thread David Blaikie
Author: dblaikie Date: Fri Jun 29 13:00:25 2012 New Revision: 159442 URL: http://llvm.org/viewvc/llvm-project?rev=159442&view=rev Log: Avoid redundant error when redefining a function as deleted. Reviewed by Doug Gregor. Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp cfe/trunk/test/SemaCXX

Re: [cfe-commits] [patch] Avoid redundant error when redefining a function as deleted

2012-06-29 Thread Douglas Gregor
On Jun 27, 2012, at 11:10 AM, David Blaikie wrote: > void func() {} > void func() = delete; > > currently produces two errors in Clang - the first says that you are > redefining func, the second says that a deleted definition must be the > first declaration. > > This patch suppresses the latte

Re: [cfe-commits] r159309 - in /cfe/trunk: lib/AST/CommentBriefParser.cpp test/Index/annotate-comments.cpp

2012-06-29 Thread Douglas Gregor
On Jun 27, 2012, at 5:01 PM, Dmitri Gribenko wrote: > Author: gribozavr > Date: Wed Jun 27 19:01:41 2012 > New Revision: 159309 > > URL: http://llvm.org/viewvc/llvm-project?rev=159309&view=rev > Log: > Teach \brief parser about commands that start a new paragraph implicitly > > Modified: >

Re: [cfe-commits] [OpenCL patch] Optional attributes (controversial)

2012-06-29 Thread Douglas Gregor
On Jun 28, 2012, at 7:46 AM, Anton Lokhmotov wrote: > Here's controversial code for supporting the vec_type_hint and endian > attributes. Should be applied after [non-controversial]. Thoughts? DummyTypeExpr is a really too much of a hack here; aside from losing all source information, it dup

Re: [cfe-commits] [patch] Trying to fix __va_list_tag serialization issue (bug 13189)

2012-06-29 Thread Douglas Gregor
On Jun 29, 2012, at 10:31 AM, Meador Inge wrote: > > On Jun 29, 2012, at 12:20 PM, Douglas Gregor wrote: > >> >> On Jun 29, 2012, at 8:07 AM, Jean-Daniel Dupas >> wrote: >> >>> >>> Le 29 juin 2012 à 16:58, Meador Inge a écrit : >>> On Jun 29, 2012, at 1:49 AM, Jean-Daniel Dupa

Re: [cfe-commits] [patch] Trying to fix __va_list_tag serialization issue (bug 13189)

2012-06-29 Thread Meador Inge
On Jun 29, 2012, at 12:20 PM, Douglas Gregor wrote: > > On Jun 29, 2012, at 8:07 AM, Jean-Daniel Dupas wrote: > >> >> Le 29 juin 2012 à 16:58, Meador Inge a écrit : >> >>> >>> On Jun 29, 2012, at 1:49 AM, Jean-Daniel Dupas wrote: >>> Le 29 juin 2012 à 07:57, Meador Inge a écrit

Re: [cfe-commits] [patch] Trying to fix __va_list_tag serialization issue (bug 13189)

2012-06-29 Thread Douglas Gregor
On Jun 29, 2012, at 8:07 AM, Jean-Daniel Dupas wrote: > > Le 29 juin 2012 à 16:58, Meador Inge a écrit : > >> >> On Jun 29, 2012, at 1:49 AM, Jean-Daniel Dupas wrote: >> >>> >>> Le 29 juin 2012 à 07:57, Meador Inge a écrit : >>> Moving to cfe-commits... On Jun 28, 2012, at

Re: [cfe-commits] [patch] Fix fixme about duplicated utf conversion code in codegen and lex

2012-06-29 Thread Nico Weber
All done (except for the static_cast, since that line also converts signedness). Any comments on the new file name / location from anyone? On Wed, Jun 27, 2012 at 7:06 AM, Hans Wennborg wrote: > On Mon, Jun 25, 2012 at 4:54 AM, Nico Weber wrote: > > Hi, > > > > the attached patch moves the du

[cfe-commits] r159436 - /cfe/trunk/lib/Sema/SemaExpr.cpp

2012-06-29 Thread Nico Weber
Author: nico Date: Fri Jun 29 11:39:58 2012 New Revision: 159436 URL: http://llvm.org/viewvc/llvm-project?rev=159436&view=rev Log: Change condition to be the same as in SemaTemplateInstantiate. No functionality change. Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/

Re: [cfe-commits] [PATCH 1/2] [clang.py] Add TranslationUnit.get_{file, source_location, source_range}

2012-06-29 Thread Gregory Szorc
Having thought about this in my sleep, I may want to rescind this review request and refactor things a little. 1) I may change "range" and "source_range" names to "extent" since that is what is used elsewhere. 2) I may combine the bounds to obtain ranges/extents from two arguments to 2-tuples. 3)

Re: [cfe-commits] [PATCH] libclang support for CompilationDatabase + python binding

2012-06-29 Thread Arnaud de Grandmaison
Thanks Ted, I committed (r159382), factoring Index.h I attached the updated patches for adding CompilationDatabase support to libclang + python. The libclang patch builds on the above factoring, with no other modification. The python patch is unmodified with respect to previous reviews. Cheers,

Re: [cfe-commits] [patch] Trying to fix __va_list_tag serialization issue (bug 13189)

2012-06-29 Thread Jean-Daniel Dupas
Le 29 juin 2012 à 16:58, Meador Inge a écrit : > > On Jun 29, 2012, at 1:49 AM, Jean-Daniel Dupas wrote: > >> >> Le 29 juin 2012 à 07:57, Meador Inge a écrit : >> >>> Moving to cfe-commits... >>> >>> On Jun 28, 2012, at 6:06 PM, Jean-Daniel Dupas wrote: >>> Hello (and please ignore pre

Re: [cfe-commits] [patch] Trying to fix __va_list_tag serialization issue (bug 13189)

2012-06-29 Thread Meador Inge
On Jun 29, 2012, at 1:49 AM, Jean-Daniel Dupas wrote: > > Le 29 juin 2012 à 07:57, Meador Inge a écrit : > >> Moving to cfe-commits... >> >> On Jun 28, 2012, at 6:06 PM, Jean-Daniel Dupas wrote: >> >>> Hello (and please ignore previous mail to cfe-dev), >>> >>> I'm trying to fix a regression

[cfe-commits] r159428 - /cfe/trunk/test/Misc/diag-template-diffing-color.cpp

2012-06-29 Thread NAKAMURA Takumi
Author: chapuni Date: Fri Jun 29 09:14:25 2012 New Revision: 159428 URL: http://llvm.org/viewvc/llvm-project?rev=159428&view=rev Log: clang/test/Misc/diag-template-diffing-color.cpp: Remove XFAIL:cygwin. Cygwin has some terminal emulation of escape sequences. Modified: cfe/trunk/test/Misc/di

[cfe-commits] r159422 - /cfe/trunk/lib/CodeGen/CGBuilder.h

2012-06-29 Thread Chandler Carruth
Author: chandlerc Date: Fri Jun 29 07:39:08 2012 New Revision: 159422 URL: http://llvm.org/viewvc/llvm-project?rev=159422&view=rev Log: Update Clang to reflect the new home of IRBuilder.h as of r159421. Modified: cfe/trunk/lib/CodeGen/CGBuilder.h Modified: cfe/trunk/lib/CodeGen/CGBuilder.h U

[cfe-commits] r159415 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.h test/CodeGen/2010-02-10-PointerName.c

2012-06-29 Thread Bill Wendling
Author: void Date: Fri Jun 29 03:32:29 2012 New Revision: 159415 URL: http://llvm.org/viewvc/llvm-project?rev=159415&view=rev Log: Update based on move of DIBuilder.h to include/llvm. Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h cfe/trunk/test/CodeGen/2010-02-10-PointerName.c Modified:

[cfe-commits] r159412 - in /cfe/trunk: lib/AST/TypePrinter.cpp test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp

2012-06-29 Thread Axel Naumann
Author: axel Date: Fri Jun 29 02:30:33 2012 New Revision: 159412 URL: http://llvm.org/viewvc/llvm-project?rev=159412&view=rev Log: >From Philippe Canal: Update the two function overloads void TemplateSpecializationType::PrintTemplateArgumentList(raw_ostream &OS, to behave like std::st

[cfe-commits] [PATCH 2/2] [clang.py] Implement Token API

2012-06-29 Thread Gregory Szorc
This exposes all of libclang's token functions in the Python bindings. I'm putting the TokenKind enumerations in a new module, clang.enumerations. I plan to eventually move all existing enumerations there so they are all consolidated. And, maybe one day, we can even generate that file automaticall

[cfe-commits] [PATCH 1/2] [clang.py] Add TranslationUnit.get_{file, source_location, source_range}

2012-06-29 Thread Gregory Szorc
These are just convenience APIs to make obtaining File, SourceLocation, and SourceRange instances easier. Old way: f = File.from_name(tu, 'foo.c') location = SourceLocation.from_offset(tu, f, 10) New way: location = tu.get_source_location('foo.c', offset=10) diff --git a/bindings/python/clang/c