- Sep 24, 2011
-
-
Benjamin Kramer authored
Patch by Rui Paulo! llvm-svn: 140448
-
Fariborz Jahanian authored
must match property type declaration in its primary class. // rdar://10142679 llvm-svn: 140438
-
Douglas Gregor authored
llvm-svn: 140435
-
Daniel Dunbar authored
llvm-svn: 140434
-
Fariborz Jahanian authored
followed by it implementation crashes when attempt is made to access the synthesized ivar. // rdar://10177744 llvm-svn: 140432
-
Matt Beaumont-Gay authored
The token stream was not getting properly reset when leaving ParseLexedMethodDef in some error cases. In the testcase, that caused later accesses to the token stream to touch memory which had been freed as we finished parsing the class definition. Major hat-tip to AddressSanitizer for helping pinpoint the use-after-free, including the allocation and deallocation points: ==21510== ERROR: AddressSanitizer heap-use-after-free on address 0x7feb3de87848 at pc 0x249f4e2 bp 0x7fff15a89df0 sp 0x7fff15a89ce0 READ of size 1 at 0x7feb3de87848 thread T0 #0 0x249f4e2 clang::TokenLexer::Lex() #1 0x1c834a0 clang::Parser::ConsumeToken() #2 0x1c7dc0f clang::Parser::ParseDeclarationOrFunctionDefinition() #3 0x1c7e16b clang::Parser::ParseDeclarationOrFunctionDefinition() <snip> 0x7feb3de87848 is located 1992 bytes inside of 3816-byte region [0x7feb3de87080,0x7feb3de87f68) freed by thread T0 here: #0 0x3a22c19 free #1 0x1d136a1 clang::Parser::LexedMethod::~LexedMethod() #2 0x1cef528 clang::Parser::DeallocateParsedClasses() #3 0x1cef676 clang::Parser::PopParsingClass() #4 0x1cea094 clang::Parser::ParseCXXMemberSpecification() #5 0x1ce7ae5 clang::Parser::ParseClassSpecifier() #6 0x1cfe588 clang::Parser::ParseDeclarationSpecifiers() #7 0x1c7dbe8 clang::Parser::ParseDeclarationOrFunctionDefinition() #8 0x1c7e16b clang::Parser::ParseDeclarationOrFunctionDefinition() <snip> previously allocated by thread T0 here: #0 0x3a2302d realloc #1 0x39d7c97 llvm::SmallVectorBase::grow_pod() #2 0x1ac588e llvm::SmallVectorImpl<>::push_back() #3 0x1d12d8b clang::Parser::ConsumeAndStoreUntil() #4 0x1c9c24d clang::Parser::ConsumeAndStoreUntil() #5 0x1d12c1e clang::Parser::ConsumeAndStoreUntil() #6 0x1c9c24d clang::Parser::ConsumeAndStoreUntil() #7 0x1d10042 clang::Parser::ParseCXXInlineMethodDef() #8 0x1cec51a clang::Parser::ParseCXXClassMemberDeclaration() #9 0x1ce9de5 clang::Parser::ParseCXXMemberSpecification() #10 0x1ce7ae5 clang::Parser::ParseClassSpecifier() #11 0x1cfe588 clang::Parser::ParseDeclarationSpecifiers() #12 0x1c7dbe8 clang::Parser::ParseDeclarationOrFunctionDefinition() #13 0x1c7e16b clang::Parser::ParseDeclarationOrFunctionDefinition() <snip> llvm-svn: 140427
-
Douglas Gregor authored
llvm-svn: 140424
-
- Sep 23, 2011
-
-
Benjamin Kramer authored
Also, on windows, chdir seems to live in <direct.h>. llvm-svn: 140414
-
Matt Beaumont-Gay authored
llvm-svn: 140411
-
Daniel Dunbar authored
llvm-svn: 140410
-
Daniel Dunbar authored
to operate "as if" in a certain working directory. - For now, we just implement this by changing the actual working directory, but eventually we would want to handle this transparently. This is useful to avoid an extra exec() pair in some situations, and will be something we would want to support for more flexibility in using the Clang libraries. llvm-svn: 140409
-
Douglas Gregor authored
llvm-svn: 140408
-
David Blaikie authored
llvm-svn: 140407
-
Douglas Gregor authored
merging for overrides. One might want to make a method's availability in a superclass different from that of its subclass. Fixes <rdar://problem/10166223>. llvm-svn: 140406
-
Richard Trieu authored
is cast to a boolean. An exception has been made for string literals in logical expressions to allow the common case of use in assert statements. bool x; x = "hi"; // Warn here void foo(bool x); foo("hi"); // Warn here assert(0 && "error"); assert("error); // Warn here llvm-svn: 140405
-
Douglas Gregor authored
MatchRHSPunctuation appropriately and giving a useful source location for the complaint about attributes being added to a category. llvm-svn: 140404
-
Anna Zaks authored
Move immutable map canonization out of the removeDeadBindings loop (via using ImmutableMapRef). Gives ~2% speedup. llvm-svn: 140403
-
Douglas Gregor authored
the key function is inline, rather than the original declaration. Perhaps FunctionDecl::isInlined() is poorly named. Fixes <rdar://problem/9979458>. llvm-svn: 140400
-
Fariborz Jahanian authored
write barrier with captured pointer to object. // rdar://10150823 llvm-svn: 140399
-
Douglas Gregor authored
llvm-svn: 140389
-
Douglas Gregor authored
llvm-svn: 140388
-
Francois Pichet authored
llvm-svn: 140382
-
David Blaikie authored
llvm-svn: 140369
-
David Blaikie authored
llvm-svn: 140368
-
David Blaikie authored
llvm-svn: 140367
-
Benjamin Kramer authored
llvm-svn: 140365
-
NAKAMURA Takumi authored
llvm-svn: 140364
-
NAKAMURA Takumi authored
CMake: Define ${LLVM_TABLEGEN_EXE} with explicit ${CMAKE_EXECUTABLE_SUFFIX} on standalone build. Or build might fail with NMake. Thanks to Nicolas Le Gland! llvm-svn: 140360
-
Douglas Gregor authored
constructor template. Fixes PR10457. llvm-svn: 140350
-
Francois Pichet authored
[microsoft] Fix a bug in -fdelayed-template-parsing mode where we were not reentering the delayed function context correctly. The problem was that all template params were reintroduced inside the same scope. So if we had a situation where we had 2 template params with the same name at different scope then clang would generate an error about ambiguous name. The solution is to create a new ParseScope(Scope::TemplateParamScope) for each template scope that we want to reenter. (from the outmost to the innermost scope) This fixes some errors when parsing MFC code with clang. llvm-svn: 140344
-
Benjamin Kramer authored
llvm-svn: 140343
-
Benjamin Kramer authored
llvm-svn: 140342
-
- Sep 22, 2011
-
-
Benjamin Kramer authored
This moves the existing code for CPATH into the driver and adds the environment lookup and path splitting there. The paths are then passed down to cc1 with -I options (CPATH), added after the normal user-specified include dirs. Language specific paths are passed via -LANG-isystem and the actual filtering is performed in the frontend. I tried to match GCC's behavior as close as possible Fixes PR8971. llvm-svn: 140341
-
Argyrios Kyrtzidis authored
may be unordered and MSVC's debug-mode doesn't like it. llvm-svn: 140337
-
Bill Wendling authored
It's not valid to remove filters from landingpad instructions, even if we catch the type. The metadata won't be set up correctly. Testcase is projects/llvm-test/SingleSource/UnitTests/EH/filter-2.cpp. llvm-svn: 140335
-
Douglas Gregor authored
generation when we're dealing with an implicitly-defined copy or move constructor. And, actually set the implicitly-defined bit for implicitly-defined constructors and destructors. Should fix self-host. llvm-svn: 140334
-
Argyrios Kyrtzidis authored
Use ASTTemplateArgumentListInfo instead. llvm-svn: 140331
-
Argyrios Kyrtzidis authored
llvm-svn: 140330
-
Ted Kremenek authored
llvm-svn: 140329
-
Anna Zaks authored
ST->scanReachableSymbols() is creating a SubRegionMap (SRM) on every call since one SRM is created in each ScanReachableSymbols instance. Creating the object just once and calling only scan inside the loop gives ~ 14% speed up of the StaticAnalyzer run (Release+Asserts). Pull out the declaration of the ScanReachableSymbols so that it can be used directly. Document ProgramState::scanReachableSymbols() methods. llvm-svn: 140323
-