summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* emit warn_char_constant_too_large at most once per literal, fixing PR6852Chris Lattner2010-04-162-1/+10
| | | | llvm-svn: 101580
* make our existing "switch on bool" warning work for C. SinceChris Lattner2010-04-165-4/+79
| | | | | | | the result of comparisons are 'int' in C, it doesn't work to test just the result type of the expression. llvm-svn: 101576
* If a non-noreturn virtual member function is guaranteed not to return,Douglas Gregor2010-04-162-5/+21
| | | | | | | do *not* suggest that the function could be attribute 'noreturn'; overridden functions may end up returning. llvm-svn: 101572
* Switch Sema::FindCompositePointerType() over to InitializationSequence. Douglas Gregor2010-04-163-42/+72
| | | | | | | This is the last of the uses of TryImplicitConversion outside of overload resolution and InitializationSequence itself. llvm-svn: 101569
* fix PR6766: codegen of var initialized with wide charNuno Lopes2010-04-163-9/+17
| | | | llvm-svn: 101568
* Move Sema::PerformImplicitConversion over to where ↵Douglas Gregor2010-04-162-24/+24
| | | | | | Sema::TryImplicitConversion is, for my own sanity. No functionality change llvm-svn: 101554
* Make Sema::BuildCXXCastArgument static, since it now only has one caller. No ↵Douglas Gregor2010-04-162-44/+40
| | | | | | functionality change llvm-svn: 101550
* Collapse the three separate initialization paths inDouglas Gregor2010-04-1610-234/+70
| | | | | | | | | | | | | | | | | | TryStaticImplicitCast (for references, class types, and everything else, respectively) into a single invocation of InitializationSequence. One of the paths (for class types) was the only client of Sema::TryInitializationByConstructor, which I have eliminated. This also simplified the interface for much of the cast-checking logic, eliminating yet more code. I've kept the representation of C++ functional casts with <> 1 arguments the same, despite the fact that I hate it. That fix will come soon. To satisfy my paranoia, I've bootstrapped + tested Clang with these changes. llvm-svn: 101549
* Rework USR generation for symbols with no linkage. Many of the USRs are now ↵Ted Kremenek2010-04-163-31/+67
| | | | | | | | | | shortened, and we now include the file name that declares the symbol with no linkage in the USR. USRs for such symbols are generated only in restructed cases, e.g., anonymous enum declarations, typedefs, etc. llvm-svn: 101542
* add another test for the undef patch just for to have peace of mind :)Nuno Lopes2010-04-161-0/+3
| | | | | | this follows from C99 6.7.8p10: if it is a union, the first named member is initialized llvm-svn: 101539
* fix a bogus assertion exposed by a recent change: packing theChris Lattner2010-04-162-1/+6
| | | | | | | | | | | | | | | | | struct may cause it to shrink more than one byte. Before my recent changes we compiled the new test into: %0 = type { [6 x i8] } @x = global %0 { [6 x i8] undef }, align 2 ; <%0*> [#uses=0] which is obviously bogus. Now we compile it into: %0 = type <{ i32, i8, i8 }> @x = global %0 zeroinitializer, align 2 ; <%0*> [#uses=0] Where the last byte only is tail padding. llvm-svn: 101536
* emit padding as undef values, take 2Nuno Lopes2010-04-165-20/+47
| | | | | | merge also a few tests I had here for this feature, and FileCheck'ize one file llvm-svn: 101535
* Switch the checking of implicit casts for static_cast, C-style, andDouglas Gregor2010-04-162-22/+23
| | | | | | | | | | functional casts over to InitializationSequence, eliminating a caller of Sema::TryImplicitConversion. We also get access and ambiguity checking "for free". More cleanups to come in this routine. llvm-svn: 101526
* Add a write(raw_ostream&) method to RewriteBuffer. This uses an inefficientNick Lewycky2010-04-163-7/+15
| | | | | | | implementation today but is the right place if we want to make it faster some day. llvm-svn: 101521
* allow mapping fatal errors to errors.Chris Lattner2010-04-161-2/+3
| | | | llvm-svn: 101516
* Kill ForceRValue once and for allDouglas Gregor2010-04-165-17/+2
| | | | llvm-svn: 101502
* Static analyzer: Don't crash when casting a symbolic region address to a ↵Ted Kremenek2010-04-162-8/+24
| | | | | | float. Fixes PR 6854. llvm-svn: 101499
* Eliminate the ForceRValue parameter from TryCopyInitialization.Douglas Gregor2010-04-161-9/+2
| | | | llvm-svn: 101498
* Move Sema::TryCopyInitialization into a static function inDouglas Gregor2010-04-162-29/+24
| | | | | | SemaOverload.cpp; no functionality change. llvm-svn: 101497
* Eliminate ForceRValue parameters from reference binding. Did I mentionDouglas Gregor2010-04-162-14/+9
| | | | | | that we aren't using ForceRValue any more? llvm-svn: 101496
* Silence warning.Benjamin Kramer2010-04-161-1/+1
| | | | llvm-svn: 101495
* Eliminate the ForceRValue parameter to Sema::AddOverloadCandidateDouglas Gregor2010-04-163-10/+6
| | | | llvm-svn: 101494
* Eliminate the ForceRValue parameter from most of Sema's Add*CandidateDouglas Gregor2010-04-162-25/+17
| | | | | | functions. llvm-svn: 101492
* Eliminate the ForceRValue parameter from Sema::IsUserDefinedConversion. It's ↵Douglas Gregor2010-04-162-8/+5
| | | | | | not the way we're going to handle this. llvm-svn: 101483
* Eliminate the default value for the UserCast parameter of ↵Douglas Gregor2010-04-162-2/+2
| | | | | | Sema::IsUserDefinedConversion. No functionality change llvm-svn: 101482
* Eliminate the Elidable parameter to PerformImplicitConversion; weDouglas Gregor2010-04-163-27/+10
| | | | | | don't need it. llvm-svn: 101481
* Remove this hard-coded buffer size. In some basic experiments preprocessingDan Gohman2010-04-161-2/+0
| | | | | | | | | | | large files, this doesn't seem significantly better than just letting raw_ostream pick a buffer size. This code predates raw-ostream's automatic buffer sizing; in fact, it was introduced as part of the code which would eventually become raw_ostream. llvm-svn: 101473
* Make CGRecordLayoutBuilder deal with wide bit-fields. Will land tests ↵Anders Carlsson2010-04-161-1/+20
| | | | | | shortly (Daniel, please review). llvm-svn: 101472
* Remove printfs.Anders Carlsson2010-04-161-6/+0
| | | | llvm-svn: 101470
* More work on wide bit-fields, WIP.Anders Carlsson2010-04-163-1/+85
| | | | llvm-svn: 101467
* Start working on handling wide bitfields in C++Anders Carlsson2010-04-163-4/+37
| | | | llvm-svn: 101464
* Rename the ASTContext member 'Context'.Anders Carlsson2010-04-162-35/+35
| | | | llvm-svn: 101462
* Only predefine the macro _GNU_SOURCE in C++ mode when we're on aDouglas Gregor2010-04-162-5/+27
| | | | | | | platform that typically uses glibc. Fixes a Boost.Thread compilation failure. llvm-svn: 101450
* tidy upChris Lattner2010-04-161-1/+0
| | | | llvm-svn: 101447
* Expand the argument diagnostics for too many arguments and giveEric Christopher2010-04-164-9/+20
| | | | | | | | both number seen and number expected. Finishes fixing PR6501. llvm-svn: 101442
* Expand argument diagnostic for too few arguments to give the numberEric Christopher2010-04-164-14/+28
| | | | | | | | of arguments both seen and expected. Fixes PR6501. llvm-svn: 101441
* Convert libCIndex to use the new native EXPORTED_SYMBOL_FILE mechanism.Dan Gohman2010-04-164-83/+169
| | | | | | | | libCIndex also has a CMakeLists.txt file which has its own code for using the exports file. To preserve existing functionality, create a separate darwin-specific exports file for use by this CMakeLists.txt code. llvm-svn: 101440
* Fix a bug in caret-line-pruning logic that only happens when we have aDouglas Gregor2010-04-162-6/+23
| | | | | | | | source line wider than the terminal where the associated fix-it line is longer than the caret line. Previously, we would crash in this case, which was rather unfortunate. Fixes <rdar://problem/7856226>. llvm-svn: 101426
* Audit uses of Sema::LookupSingleName for those lookups that areDouglas Gregor2010-04-156-15/+43
| | | | | | | | | | | intended for redeclarations, fixing those that need it. Fixes PR6831. This uncovered an issue where the C++ type-specifier-seq parsing logic would try to perform name lookup on an identifier after it already had a type-specifier, which could also lead to spurious ambiguity errors (as in PR6831, but with a different test case). llvm-svn: 101419
* Feed proper source-location information into Sema::LookupSingleResult,Douglas Gregor2010-04-1512-68/+107
| | | | | | | | in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831. llvm-svn: 101412
* Better support USRs for anonymous enums, structs, by including the location ↵Ted Kremenek2010-04-151-3/+42
| | | | | | | | where the tag was declared. WIP. llvm-svn: 101403
* Specify temporary file for -emit-llvm output in test case so that we don't ↵Ted Kremenek2010-04-151-1/+1
| | | | | | | | deposit the file in the original source directory. llvm-svn: 101402
* Do not generate USRs for declarations with 'no linkage' except for enums, ↵Ted Kremenek2010-04-151-7/+28
| | | | | | | | structs, typedefs. Those still need work to disambiguate them across translation units. llvm-svn: 101401
* Improve the bit-field too wide error message.Anders Carlsson2010-04-154-7/+7
| | | | llvm-svn: 101384
* Diagnose attempts to throw an abstract class type.Douglas Gregor2010-04-153-0/+17
| | | | llvm-svn: 101381
* Fix PR 6844, a regression caused by the introduction of llvm_unreachable for ↵Ted Kremenek2010-04-152-25/+71
| | | | | | | | | | the default case in GRExprEngine::Visit (in r101129). Instead, enumerate all Stmt cases and have no 'default' case in the switch statement. When we encounter a Stmt we don't handle, we should explicitly add it to the switch statement. llvm-svn: 101378
* Split adding the primary virtual base offsets out into a separate pass. This ↵Anders Carlsson2010-04-153-35/+158
| | | | | | fixes a bug where we would lay out virtual bases in the wrong order. llvm-svn: 101373
* Fix a few cases where enum constant handling was usingDouglas Gregor2010-04-152-6/+10
| | | | | | | | | | ASTContext::getTypeSize() rather than ASTContext::getIntWidth() for the width of an integral type. The former includes padding for bools (to the target's size) while the latter does not, so we woud end up zero-extending bools to the target width when we shouldn't. Fixes a crash-on-valid in the included test. llvm-svn: 101372
* clang -cc1: Add a -fno-bitfield-type-align option, for my own testing purposes.Daniel Dunbar2010-04-154-2/+19
| | | | llvm-svn: 101370
* Tweak spelling (Bitfield -> BitField)Daniel Dunbar2010-04-153-5/+5
| | | | llvm-svn: 101369
OpenPOWER on IntegriCloud