| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 140500
|
| |
|
|
| |
llvm-svn: 140499
|
| |
|
|
| |
llvm-svn: 140498
|
| |
|
|
|
|
|
|
|
|
|
|
| |
characters. I could find no newline character in a diagnostic message,
and adding an assert to this code never fires in the testsuite.
I think this code is essentially dead, and was previously used for
a different purpose. If I just don't understand how it is we can end up
with a newline here please let me know (with a test case?) and I'll
revert.
llvm-svn: 140497
|
| |
|
|
|
|
|
| |
printing routines, clean up its doxyments and switch it to a camelCase
name as well. No functionality changed here.
llvm-svn: 140496
|
| |
|
|
|
|
| |
style, and add doxyments.
llvm-svn: 140495
|
| |
|
|
|
|
| |
use the ostream interface and avoid lots of temporary strings.
llvm-svn: 140494
|
| |
|
|
| |
llvm-svn: 140493
|
| |
|
|
| |
llvm-svn: 140492
|
| |
|
|
| |
llvm-svn: 140491
|
| |
|
|
|
|
| |
This needs to be cleaned up to better use the ostream object, WIP.
llvm-svn: 140490
|
| |
|
|
| |
llvm-svn: 140489
|
| |
|
|
|
|
|
| |
I'm planning to switch a bunch of these over to use a raw_ostream
instead of += on a string object.
llvm-svn: 140488
|
| |
|
|
|
|
|
|
| |
and completely broken at that.
Sorry, must remember to stash rather than commit. =]
llvm-svn: 140487
|
| |
|
|
| |
llvm-svn: 140486
|
| |
|
|
| |
llvm-svn: 140485
|
| |
|
|
| |
llvm-svn: 140484
|
| |
|
|
| |
llvm-svn: 140483
|
| |
|
|
| |
llvm-svn: 140482
|
| |
|
|
|
|
| |
function.
llvm-svn: 140481
|
| |
|
|
| |
llvm-svn: 140480
|
| |
|
|
| |
llvm-svn: 140479
|
| |
|
|
| |
llvm-svn: 140478
|
| |
|
|
|
|
| |
hoisting parts of the text diagnostic.
llvm-svn: 140477
|
| |
|
|
|
|
|
| |
to handle non-caret diagnostics as well in order to be fully useful in
libclang etc. Also sketch out some more of my plans on this refactoring.
llvm-svn: 140476
|
| |
|
|
|
|
|
|
| |
tracking the start and stop of macro expansion suppression. Also remove
the Columns variable which was just a convenience variable based on
DiagOpts. Instead we materialize it in the one piece of code that cared.
llvm-svn: 140475
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TextDiagnosticPrinter into the CaretDiagnostic class. Several
interesting results from this:
- This removes a significant per-diagnostic bit of state from the
CaretDiagnostic class, which should eventually allow us to re-use the
object.
- It removes a redundant recursive walk of the macro expansion stack
just to compute the depth. We don't need the depth until we're
unwinding anyways, so we can just mark when we reach it.
- It also paves the way for several simplifications we can do to how we
implement the suppression.
llvm-svn: 140474
|
| |
|
|
|
|
| |
emits a source snippet and caret line.
llvm-svn: 140467
|
| |
|
|
|
|
| |
Also make sure we set the error flag when correcting a typo.
llvm-svn: 140466
|
| |
|
|
| |
llvm-svn: 140462
|
| |
|
|
|
|
|
|
|
| |
cannot be converted.
This is in preparation for overload resolution of initializer lists.
Currently, you will always get this message when you try to pass an init
list to an overloaded function.
llvm-svn: 140461
|
| |
|
|
|
|
|
|
|
|
|
| |
correctly pass
the information on to Sema. There's still an incorrectness in the way template instantiation
works now, but that is due to a far larger underlying representational problem.
Also add a test case for various list initialization cases of scalars, which test this
commit as well as the previous one.
llvm-svn: 140460
|
| |
|
|
|
|
|
|
|
| |
Allow empty initializer lists for scalars, which mean value-initialization.
Constant evaluation for single-element and empty initializer lists for scalars.
Codegen for empty initializer lists for scalars.
Test case comes in next commit.
llvm-svn: 140459
|
| |
|
|
|
|
|
|
| |
generalized-initializers.cpp to
match what the actual implementation of the error looks like.
llvm-svn: 140458
|
| |
|
|
|
|
|
|
|
|
|
| |
diagnostics nor
builds a semantic (structured) initializer list, just reports on whether it can match
the given list to the target type.
Use this mode for doing init list checking in the initial step of initialization, which
will eventually allow us to do overload resolution based on the outcome.
llvm-svn: 140457
|
| |
|
|
|
|
|
| |
resolves to a constructor call in C++11) and failure kind
FK_ListInitializationFailed (early InitListChecker run failed).
llvm-svn: 140456
|
| |
|
|
| |
llvm-svn: 140455
|
| |
|
|
| |
llvm-svn: 140454
|
| |
|
|
|
|
|
|
|
| |
function and we can't resolve an identifier then assume the identifier is type dependent. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes.
This fixes a few errors when parsing MFC code with clang.
BTW clang trunk is now about 5 patches away to be able the parse the default wizard-generated MFC project.
llvm-svn: 140452
|
| |
|
|
|
|
| |
Patch by Rui Paulo!
llvm-svn: 140448
|
| |
|
|
|
|
|
| |
must match property type declaration in its
primary class. // rdar://10142679
llvm-svn: 140438
|
| |
|
|
| |
llvm-svn: 140435
|
| |
|
|
| |
llvm-svn: 140434
|
| |
|
|
|
|
|
|
| |
followed by it implementation crashes when attempt
is made to access the synthesized ivar.
// rdar://10177744
llvm-svn: 140432
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 140424
|
| |
|
|
|
|
|
|
| |
doesn't.
Also, on windows, chdir seems to live in <direct.h>.
llvm-svn: 140414
|
| |
|
|
| |
llvm-svn: 140411
|
| |
|
|
| |
llvm-svn: 140410
|
| |
|
|
|
|
|
|
|
|
| |
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
|