Re: [cfe-commits] [PATCH] Parsing C++0x lambda expressions

2011-08-04 Thread John Freeman
On 8/3/11 12:23 PM, David Blaikie wrote: I'd had the same thought when I was adding test cases fixing a couple of bugs, but when I went to rewrite it I wasn't confident enough that I could come up with a better solution. After reading this feedback I went back to have another go came up with

Re: [cfe-commits] [PATCH] Parsing C++0x lambda expressions

2011-08-04 Thread Douglas Gregor
On Aug 4, 2011, at 6:54 AM, John Freeman wrote: On 8/3/11 12:23 PM, David Blaikie wrote: I'd had the same thought when I was adding test cases fixing a couple of bugs, but when I went to rewrite it I wasn't confident enough that I could come up with a better solution. After reading this

[cfe-commits] r136882 - in /cfe/trunk: include/clang/Serialization/ASTBitCodes.h include/clang/Serialization/ASTReader.h lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp

2011-08-04 Thread Douglas Gregor
Author: dgregor Date: Thu Aug 4 11:36:56 2011 New Revision: 136882 URL: http://llvm.org/viewvc/llvm-project?rev=136882view=rev Log: Implement the local - global remapping for macro definition IDs in the detailed preprocessing record. Tested with the standard gaps method. Modified:

[cfe-commits] r136883 - /cfe/trunk/lib/Serialization/ASTWriter.cpp

2011-08-04 Thread Douglas Gregor
Author: dgregor Date: Thu Aug 4 11:39:39 2011 New Revision: 136883 URL: http://llvm.org/viewvc/llvm-project?rev=136883view=rev Log: Add some missing record names to the AST output. No functionality change, but llvm-bcanalyzer will be a little more informative now for AST files Modified:

[cfe-commits] r136885 - in /cfe/trunk/lib/Serialization: ASTReader.cpp ASTWriter.cpp

2011-08-04 Thread Douglas Gregor
Author: dgregor Date: Thu Aug 4 12:06:18 2011 New Revision: 136885 URL: http://llvm.org/viewvc/llvm-project?rev=136885view=rev Log: In the AST reader and writer, slide the preprocessed entity IDs by +1 so that we use ID zero as a sentinel for no result. This matches the convention set by all of

Re: [cfe-commits] PATCH: Generate more useful messages for out-of-line definition errors

2011-08-04 Thread Kaelyn Uhrain
On Wed, Aug 3, 2011 at 2:48 PM, Douglas Gregor dgre...@apple.com wrote: Hi Kaelyn, On Jul 28, 2011, at 1:53 PM, Kaelyn Uhrain wrote: On Wed, Jul 27, 2011 at 11:20 AM, Douglas Gregor dgre...@apple.comwrote: On Jul 25, 2011, at 6:12 PM, Kaelyn Uhrain wrote: Doug, Thanks for the review.

[cfe-commits] r136889 - /cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp

2011-08-04 Thread Anna Zaks
Author: zaks Date: Thu Aug 4 12:28:06 2011 New Revision: 136889 URL: http://llvm.org/viewvc/llvm-project?rev=136889view=rev Log: KeychainAPI checker: Refactor to make it easier to add more allocator/deallocator API pairs. Add the allocator function ID to the checker state. Better comments.

[cfe-commits] r136891 - in /cfe/trunk: include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds.td lib/AST/Type.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/nested-name-spec.cpp test/SemaCXX/out-of-

2011-08-04 Thread Kaelyn Uhrain
Author: rikka Date: Thu Aug 4 12:40:00 2011 New Revision: 136891 URL: http://llvm.org/viewvc/llvm-project?rev=136891view=rev Log: Match type names and give more info for out-of-line function definition errors. Having a function declaration and definition with different types for a parameter

[cfe-commits] r136892 - in /cfe/trunk: include/clang/Basic/TargetInfo.h lib/AST/RecordLayoutBuilder.cpp lib/Basic/Targets.cpp

2011-08-04 Thread Chad Rosier
Author: mcrosier Date: Thu Aug 4 12:52:43 2011 New Revision: 136892 URL: http://llvm.org/viewvc/llvm-project?rev=136892view=rev Log: Additional comments and whitespace. Modified: cfe/trunk/include/clang/Basic/TargetInfo.h cfe/trunk/lib/AST/RecordLayoutBuilder.cpp

[cfe-commits] r136893 - in /cfe/trunk: include/clang/Serialization/ASTReader.h lib/Serialization/ASTReader.cpp

2011-08-04 Thread Douglas Gregor
Author: dgregor Date: Thu Aug 4 13:09:14 2011 New Revision: 136893 URL: http://llvm.org/viewvc/llvm-project?rev=136893view=rev Log: Remove the unset, unused return value of ASTReader::ReadMacroRecord(). No functionality change. Modified: cfe/trunk/include/clang/Serialization/ASTReader.h

[cfe-commits] r136902 - in /cfe/trunk: include/clang/Serialization/ASTBitCodes.h include/clang/Serialization/ASTReader.h include/clang/Serialization/ContinuousRangeMap.h lib/Serialization/ASTReader.cp

2011-08-04 Thread Douglas Gregor
Author: dgregor Date: Thu Aug 4 13:56:47 2011 New Revision: 136902 URL: http://llvm.org/viewvc/llvm-project?rev=136902view=rev Log: Introduce local - global mapping for preprocessed entity IDs. This is the last of the ID/offset/index mappings that I know of. Unfortunately, the gap method of

[cfe-commits] r136903 - /cfe/trunk/lib/Serialization/ASTReader.cpp

2011-08-04 Thread Douglas Gregor
Author: dgregor Date: Thu Aug 4 14:00:50 2011 New Revision: 136903 URL: http://llvm.org/viewvc/llvm-project?rev=136903view=rev Log: Clean up the debug dump for a Module, so the local-global maps are clearly called out, and add the missing local - global selector map output. Modified:

[cfe-commits] r136907 - in /cfe/trunk/lib/AST: ASTContext.cpp RecordLayoutBuilder.cpp

2011-08-04 Thread Chad Rosier
Author: mcrosier Date: Thu Aug 4 14:25:14 2011 New Revision: 136907 URL: http://llvm.org/viewvc/llvm-project?rev=136907view=rev Log: Fix style and remove obviously redundant code. Modified: cfe/trunk/lib/AST/ASTContext.cpp cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Modified:

Re: [cfe-commits] [cfe-dev] Proposal for thread safety attributes for Clang

2011-08-04 Thread Douglas Gregor
On Aug 1, 2011, at 4:17 PM, Caitlin Sadowski wrote: Here it is. Cheers, I don't see the reason for this change: --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -27,7 +27,7 @@ using namespace sema; /// These constants match the enumerated choices of ///

[cfe-commits] r136911 - in /cfe/trunk: include/clang-c/Index.h include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp test/Index/get-cursor.cpp tools/c-index-test/c-index-test.c tools/libclang/CXCu

2011-08-04 Thread Douglas Gregor
Author: dgregor Date: Thu Aug 4 15:04:59 2011 New Revision: 136911 URL: http://llvm.org/viewvc/llvm-project?rev=136911view=rev Log: Add a new libclang API to return a CXCompletionString for an arbitrary cursor, from Connor Wakamo! Addresses rdar://problem/9087798. Modified:

Re: [cfe-commits] [PATCH] New libclang API, clang_getCursorCompletionString

2011-08-04 Thread Douglas Gregor
On Aug 1, 2011, at 1:10 PM, Connor Wakamo wrote: I am submitting for review a patch that adds a new libclang API to return a CXCompletionString for an arbitrary cursor: CXCompletionString clang_getCursorCompletionString(CXCursor) The completion strings are not context-sensitive but do

[cfe-commits] r136924 - /cfe/trunk/test/CodeGen/ms_struct-bitfield-1.c

2011-08-04 Thread Chad Rosier
Author: mcrosier Date: Thu Aug 4 16:26:30 2011 New Revision: 136924 URL: http://llvm.org/viewvc/llvm-project?rev=136924view=rev Log: Formatting. Modified: cfe/trunk/test/CodeGen/ms_struct-bitfield-1.c Modified: cfe/trunk/test/CodeGen/ms_struct-bitfield-1.c URL:

[cfe-commits] r136930 - /cfe/trunk/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp

2011-08-04 Thread Anna Zaks
Author: zaks Date: Thu Aug 4 16:53:01 2011 New Revision: 136930 URL: http://llvm.org/viewvc/llvm-project?rev=136930view=rev Log: KeychainAPI checker: Track additional pair of SecKeychain APIs. Also, keep exploring the transition on which a call to allocator function failed (to be able to find

[cfe-commits] PATCH: Add support for resolving overloaded template functions in Sema::DiagnoseEmptyLookup

2011-08-04 Thread Kaelyn Uhrain
Doug, Here's a the patch building on my previous overloaded function resolution patch. In addition to handling template functions properly when doing the overload resolution (which turned out to be easier than anticipated), it also fixes tiny bug in my previous patch that lead to no error message

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

2011-08-04 Thread Matt Beaumont-Gay
Author: matthewbg Date: Thu Aug 4 17:35:03 2011 New Revision: 136937 URL: http://llvm.org/viewvc/llvm-project?rev=136937view=rev Log: Put a few warnings into a DiagGroup. Feel free to improve the flag name! Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified:

[cfe-commits] r136938 - /cfe/trunk/test/Analysis/keychainAPI.m

2011-08-04 Thread Anna Zaks
Author: zaks Date: Thu Aug 4 17:40:38 2011 New Revision: 136938 URL: http://llvm.org/viewvc/llvm-project?rev=136938view=rev Log: KeychainAPI checker: forgot to commit the test with r136930. This should fix the bot. Modified: cfe/trunk/test/Analysis/keychainAPI.m Modified:

[cfe-commits] r136939 - in /cfe/trunk: lib/Analysis/UninitializedValues.cpp test/SemaCXX/uninit-variables.cpp

2011-08-04 Thread Ted Kremenek
Author: kremenek Date: Thu Aug 4 17:40:57 2011 New Revision: 136939 URL: http://llvm.org/viewvc/llvm-project?rev=136939view=rev Log: Fix assertion failure in -Wuninitialized involving no-op casts. Fixes PR 10577. Modified: cfe/trunk/lib/Analysis/UninitializedValues.cpp

Re: [cfe-commits] PATCH: Add support for resolving overloaded template functions in Sema::DiagnoseEmptyLookup

2011-08-04 Thread Chandler Carruth
FYI On Thu, Aug 4, 2011 at 3:04 PM, Kaelyn Uhrain ri...@google.com wrote: it also fixes tiny bug in my previous patch that lead to no error message being printed out if the call to BestViableFunction did not succeed Do you have a test case for this? Also, can you split this into its own

Re: [cfe-commits] PATCH: Add support for resolving overloaded template functions in Sema::DiagnoseEmptyLookup

2011-08-04 Thread Kaelyn Uhrain
On Thu, Aug 4, 2011 at 4:03 PM, Chandler Carruth chandl...@google.comwrote: FYI On Thu, Aug 4, 2011 at 3:04 PM, Kaelyn Uhrain ri...@google.com wrote: it also fixes tiny bug in my previous patch that lead to no error message being printed out if the call to BestViableFunction did not

Re: [cfe-commits] PATCH: Add support for resolving overloaded template functions in Sema::DiagnoseEmptyLookup

2011-08-04 Thread Chandler Carruth
On Thu, Aug 4, 2011 at 4:07 PM, Kaelyn Uhrain ri...@google.com wrote: That would be the additions to function-overload-typo-crash.cpp without the rest of my patch. ;) Ah, cool. Yea, just one (or all) with fixmes would be great to go ahead and commit.

[cfe-commits] r136941 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaStmt.cpp

2011-08-04 Thread Matt Beaumont-Gay
Author: matthewbg Date: Thu Aug 4 18:11:04 2011 New Revision: 136941 URL: http://llvm.org/viewvc/llvm-project?rev=136941view=rev Log: Specialize diag::warn_unused_call for the warn_unused_result attribute, so it can be controlled with a distinct flag. Modified:

Re: [cfe-commits] PATCH: Add support for resolving overloaded template functions in Sema::DiagnoseEmptyLookup

2011-08-04 Thread Chandler Carruth
On Thu, Aug 4, 2011 at 4:35 PM, Kaelyn Uhrain ri...@google.com wrote: I've committed the fix and test cases as r136943, and rebased my patch against that revision. Missing attachment? (not a big deal, easy to review the original patch) ___

Re: [cfe-commits] PATCH: Add support for resolving overloaded template functions in Sema::DiagnoseEmptyLookup

2011-08-04 Thread Chandler Carruth
On Thu, Aug 4, 2011 at 4:36 PM, Chandler Carruth chandl...@google.comwrote: On Thu, Aug 4, 2011 at 4:35 PM, Kaelyn Uhrain ri...@google.com wrote: I've committed the fix and test cases as r136943, and rebased my patch against that revision. Missing attachment? (not a big deal, easy to

Re: [cfe-commits] PATCH: Add support for resolving overloaded template functions in Sema::DiagnoseEmptyLookup

2011-08-04 Thread Kaelyn Uhrain
On Thu, Aug 4, 2011 at 4:36 PM, Chandler Carruth chandl...@google.comwrote: On Thu, Aug 4, 2011 at 4:35 PM, Kaelyn Uhrain ri...@google.com wrote: I've committed the fix and test cases as r136943, and rebased my patch against that revision. Missing attachment? (not a big deal, easy to

Re: [cfe-commits] PATCH: Add support for resolving overloaded template functions in Sema::DiagnoseEmptyLookup

2011-08-04 Thread Kaelyn Uhrain
On Thu, Aug 4, 2011 at 4:41 PM, Kaelyn Uhrain ri...@google.com wrote: On Thu, Aug 4, 2011 at 4:36 PM, Chandler Carruth chandl...@google.comwrote: On Thu, Aug 4, 2011 at 4:35 PM, Kaelyn Uhrain ri...@google.com wrote: I've committed the fix and test cases as r136943, and rebased my patch

[cfe-commits] r136946 - in /cfe/trunk: lib/Rewrite/RewriteObjC.cpp test/Rewriter/rewrite-cast-to-bool.mm

2011-08-04 Thread Fariborz Jahanian
Author: fjahanian Date: Thu Aug 4 18:58:03 2011 New Revision: 136946 URL: http://llvm.org/viewvc/llvm-project?rev=136946view=rev Log: objc rewriter: Fixes a rewriting of implicit casting of an integral argument to bool. // rdar://9899834 Added:

[cfe-commits] r136948 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaExpr.cpp lib/Sema/SemaOverload.cpp test/SemaCXX/function-overload-typo-crash.cpp

2011-08-04 Thread Kaelyn Uhrain
Author: rikka Date: Thu Aug 4 19:09:52 2011 New Revision: 136948 URL: http://llvm.org/viewvc/llvm-project?rev=136948view=rev Log: Have the typo correction in DiagnoseEmptyLookup properly handle template functions when performing function overload resolution. Modified:

[cfe-commits] r136949 - in /cfe/trunk: lib/CodeGen/CGObjC.cpp test/CodeGenObjC/arc-foreach.m

2011-08-04 Thread John McCall
Author: rjmccall Date: Thu Aug 4 19:14:38 2011 New Revision: 136949 URL: http://llvm.org/viewvc/llvm-project?rev=136949view=rev Log: The continue label in an ARC for-in loop should not involve releasing the collection. Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp

[cfe-commits] r136950 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaChecking.cpp test/SemaCXX/warn-memset-bad-sizeof.cpp

2011-08-04 Thread Matt Beaumont-Gay
Author: matthewbg Date: Thu Aug 4 19:22:34 2011 New Revision: 136950 URL: http://llvm.org/viewvc/llvm-project?rev=136950view=rev Log: Extend memset/memcpy/memmove checking to include memcmp Modified: cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/lib/Sema/SemaChecking.cpp

[cfe-commits] r136952 - in /cfe/trunk: lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp test/Analysis/keychainAPI.m

2011-08-04 Thread Anna Zaks
Author: zaks Date: Thu Aug 4 19:37:00 2011 New Revision: 136952 URL: http://llvm.org/viewvc/llvm-project?rev=136952view=rev Log: KeychainAPI checker: Generate an error on double allocation. Pull out getAsPointeeMemoryRegion so that it could be reused. Modified:

[cfe-commits] r136955 - /cfe/trunk/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c

2011-08-04 Thread Matt Beaumont-Gay
Author: matthewbg Date: Thu Aug 4 20:05:35 2011 New Revision: 136955 URL: http://llvm.org/viewvc/llvm-project?rev=136955view=rev Log: Output to /dev/null, not 0 Modified: cfe/trunk/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c Modified:

Re: [cfe-commits] r136937 - /cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

2011-08-04 Thread Douglas Gregor
On Aug 4, 2011, at 4:05 PM, Chandler Carruth wrote: On Thu, Aug 4, 2011 at 3:35 PM, Matt Beaumont-Gay matthe...@google.com wrote: + InGroupDiagGroupreturn-local-address; For reference, my idea for the name was 'return-stack-address'; I'm not sure 'local' really has enough precision in

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

2011-08-04 Thread Chandler Carruth
Author: chandlerc Date: Thu Aug 4 21:11:36 2011 New Revision: 136959 URL: http://llvm.org/viewvc/llvm-project?rev=136959view=rev Log: Change the this -W flag to 'return-stack-address'. ~or~ Paint the bikeshed green. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

Re: [cfe-commits] r136927 - in /cfe/trunk: include/clang/Basic/IdentifierTable.h include/clang/Sema/Sema.h lib/Sema/SemaDeclObjC.cpp test/SemaObjC/class-protocol-method-match.m test/SemaObjC/qualified

2011-08-04 Thread NAKAMURA Takumi
2011/8/5 Fariborz Jahanian fjahan...@apple.com: Author: fjahanian Date: Thu Aug  4 16:28:44 2011 New Revision: 136927 URL: http://llvm.org/viewvc/llvm-project?rev=136927view=rev Log: objective-c: diagnose protocol inconsistencies in following situation. When a class explicitly or