summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [libclang] Move the check for errors in c-index-test before the TU gets ↵Argyrios Kyrtzidis2011-11-131-3/+5
| | | | | | disposed. llvm-svn: 144514
* [PCH] When chaining a PCH and serializing HeaderSearch, make sure the ↵Argyrios Kyrtzidis2011-11-137-8/+36
| | | | | | | | | HeaderFileInfos from the primary PCH is deserialized, otherwise we lose info that headers were already #imported/#included. llvm-svn: 144510
* [libclang] for c-index-test, check for CINDEXTEST_FAILONERROR when doing ↵Argyrios Kyrtzidis2011-11-131-0/+12
| | | | | | -test-load-source-reparse llvm-svn: 144509
* Don't crash when a duplicate interface/protocol is inside an extern "C" context.Argyrios Kyrtzidis2011-11-133-21/+64
| | | | llvm-svn: 144508
* Fix the signature of the getcontext builtin. Patch by Dimitry Andric.Rafael Espindola2011-11-1310-10/+71
| | | | llvm-svn: 144505
* Silence unused variable warning.Benjamin Kramer2011-11-131-2/+2
| | | | llvm-svn: 144500
* When reference binding array rvalues, such as those created by compoundPeter Collingbourne2011-11-132-1/+13
| | | | | | literals of array type, materialise a temporary. llvm-svn: 144483
* Represent an APValue based on a Decl as that Decl, rather than a DeclRefExprRichard Smith2011-11-128-126/+126
| | | | | | | | or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to static member functions and static data members are now emitted as constant expressions. llvm-svn: 144468
* [PCH] Fix the test.Argyrios Kyrtzidis2011-11-121-2/+2
| | | | llvm-svn: 144467
* Add a method in ASTMutationListener for the last use of Decl's ↵Argyrios Kyrtzidis2011-11-125-30/+19
| | | | | | | | [is/set]ChangedSinceDeserialization and remove them. llvm-svn: 144466
* [PCH] When completing an objc forward reference, do not serialize the chain ↵Argyrios Kyrtzidis2011-11-129-34/+99
| | | | | | | | | | | | | | | of its categories because it is going to be rewritten (and the chain will be serialized again), otherwise we may form a cycle in its categories list when deserializing. Also introduce ASTMutationListener::CompletedObjCForwardRef to notify that a forward reference was completed; using Decl's isChangedSinceDeserialization/setChangedSinceDeserialization is bug inducing and kinda gross, we should phase it out. Fixes infinite loop in rdar://10418538. llvm-svn: 144465
* Remove unnecessary 'else's after 'return's.David Blaikie2011-11-122-8/+6
| | | | llvm-svn: 144464
* Add missing casts to AST.Eli Friedman2011-11-122-1/+11
| | | | llvm-svn: 144455
* [libclang] Further simplify the indexing API.Argyrios Kyrtzidis2011-11-128-624/+243
| | | | | | | That stuff can be added later on if we need them. Also add some const goodness. llvm-svn: 144446
* Tweak the module map file test slightly, by putting one of the headersDouglas Gregor2011-11-121-1/+1
| | | | | | | | into a submodule. Submodules aren't actually supported anywhere else, but we do parse them, so this verifies that we're at least seeing through them properly. llvm-svn: 144436
* Implement a minor optimization when loading module maps to satisfy aDouglas Gregor2011-11-122-18/+46
| | | | | | | | module import: don't re-check for a loaded module unless we've actually loaded a new module map file. Already-loaded module map files aren't interesting. llvm-svn: 144435
* When searching for a module, speculatively load module maps to see ifDouglas Gregor2011-11-125-40/+90
| | | | | | | | the module is described in one of the module maps in a search path or in a subdirectory off the search path that has the same name as the module we're looking for. llvm-svn: 144433
* Make test compatible with ARM hosts.Eli Friedman2011-11-111-3/+3
| | | | llvm-svn: 144428
* Teach the search for modules to consider modules described by a moduleDouglas Gregor2011-11-116-2/+37
| | | | | | | | | | | | | | map, so long as they have an umbrella header. This makes it possible to introduce a module map + umbrella header for a given set of headers, to turn it into a module. There are two major deficiencies here: first, we don't go hunting for module map files when we just see a module import (so we won't know about the modules described therein). Second, we don't yet have a way to build modules that don't have umbrella headers, or have incomplete umbrella headers. llvm-svn: 144424
* Fix some typos, grammar errors, etc. in cursor kind descriptionsDouglas Gregor2011-11-111-4/+4
| | | | llvm-svn: 144412
* Wire up the mapping from header files mentioned in module maps over toDouglas Gregor2011-11-115-8/+42
| | | | | | | the corresponding (top-level) modules. This isn't actually useful yet, because we don't yet have a way to build modules out of module maps. llvm-svn: 144410
* Resolve the header files named in module map "header" and "umbrella"Douglas Gregor2011-11-112-6/+79
| | | | | | declarations to actual files. llvm-svn: 144408
* Extend -Wno-bind-to-temporary-copy and -Wno-{unnamed,local}-type-template-argsRichard Smith2011-11-113-7/+57
| | | | | | | | to disable the corresponding -Wc++98-compat warnings in addition to the C++11 extension warnings, so that people already using these flags can switch to C++11 mode and turn on -Wc++98-compat. llvm-svn: 144404
* Rename SPECIAL_TYPE_jmp_buf and SPECIAL_TYPE_sigjmp_buf to follow theDouglas Gregor2011-11-112-4/+4
| | | | | | convention of SPECIAL_TYPE*. llvm-svn: 144403
* Introduce basic support for parsing module map files.Douglas Gregor2011-11-1114-2/+786
| | | | | | | | | | | | | | Module map files provide a way to map between headers and modules, so that we can layer a module system on top of existing headers without changing those headers at all. This commit introduces the module map file parser and the module map that it generates, and wires up the module map file parser so that we'll automatically find module map files as part of header search. Note that we don't yet use the information stored in the module map. llvm-svn: 144402
* When importing an ObjCInterfaceDecl, ensure thatSean Callanan2011-11-111-0/+11
| | | | | | | | superclass information is imported before validating it. This fixes spurious "incompatible superclasses" errors in LLDB. llvm-svn: 144393
* Tweak CXLoadedDiagnosticSetImpl::makeString() to include an extra null ↵Ted Kremenek2011-11-111-5/+8
| | | | | | character, and change the creation of the FixIT's string to again just rely on this string (instead of duplicating it when calling createCXString). llvm-svn: 144389
* Silence compiler warning.Benjamin Kramer2011-11-111-0/+1
| | | | llvm-svn: 144386
* Constant expression evalation: const_cast support.Richard Smith2011-11-112-6/+14
| | | | llvm-svn: 144382
* Search for libstdc++.dylib in llvm-gcc's files on darwin10. rdar://10419079Bob Wilson2011-11-111-0/+5
| | | | llvm-svn: 144381
* libclang/CXLoadedDiagnostic.cpp: Work around not to miss the string ↵NAKAMURA Takumi2011-11-112-2/+2
| | | | | | | | terminator on fixit. FixIts might be exposed as C string via clang_getCString(), though the zero terminator is not allocated in CXLoadedDiagnosticSetImpl::makeString. llvm-svn: 144379
* Don't recurse so deep in this test, pending APValue rework to further reduce theRichard Smith2011-11-111-2/+2
| | | | | | stack pressure. llvm-svn: 144378
* Reduce the constexpr stack pressure somewhat. Hopefully this will be enough toRichard Smith2011-11-111-1/+1
| | | | | | please the buildbots. llvm-svn: 144375
* test/Misc/serialized-diags.c: Tweak FileCheck expressions to be tolerant to ↵NAKAMURA Takumi2011-11-111-7/+7
| | | | | | | DOSish output. FIXME: For now, " = 0Parse Issueexpected ';' after expression{{XXX}}" would not be matched due to unexpected garbage{{XXX} on some hosts. llvm-svn: 144374
* Constant expression evaluation: support for constexpr member functions. ThisRichard Smith2011-11-115-46/+882
| | | | | | | | | | | reinstates r144273; a combination of r144333's fix for NoOp rvalue-to-lvalue casts and some corresponding changes here resolve the regression which that caused. This patch also adds support for some additional forms of member function call, along with additional testing. llvm-svn: 144369
* Place 'argument unused during compilation' under a -W flag. Fixes ↵Ted Kremenek2011-11-112-3/+3
| | | | | | <rdar://problem/10403653>. llvm-svn: 144365
* Don't apply NRVO to over-aligned variables. The caller onlyJohn McCall2011-11-112-7/+35
| | | | | | guarantees alignment up to the ABI alignment of the return type. llvm-svn: 144364
* Be sure to insulate block literals from any cleanups in theirJohn McCall2011-11-112-0/+37
| | | | | | | enclosing full-expressions. It is somewhat amazing that this hasn't come up as a problem before. llvm-svn: 144362
* Add Linux multiarch include directories for mips/mipsel. Patch from Simon ↵Eli Friedman2011-11-111-0/+10
| | | | | | Atanasyan. llvm-svn: 144358
* include/clang-c/Index.h: Update CINDEX_LINKAGE on 6 decls. Corresponds to ↵NAKAMURA Takumi2011-11-111-5/+6
| | | | | | libclang.exports in r144343 llvm-svn: 144357
* Make sure that restrict-qualifying an array actually adds a restrict ↵Eli Friedman2011-11-112-5/+4
| | | | | | qualifier. PR11354. (operator bool() is evil!) llvm-svn: 144355
* [serialized diagnostics]: add test cases for serialized diagnostics, ↵Ted Kremenek2011-11-114-3/+56
| | | | | | | | | including a test case for no issues, multiple issues, and a single issue. Along the way, tweak c-index-test -read-diagnostics output so it is easier to tell what diagnostics are child diagnostics. llvm-svn: 144349
* I predict that HeaderSearch will need the ability to generateDouglas Gregor2011-11-114-6/+11
| | | | | | diagnostics in the future. Make it so. llvm-svn: 144347
* [libclang] Simplify the indexing API.Argyrios Kyrtzidis2011-11-118-963/+629
| | | | | | | | Cut down the number of callbacks to more generic ones. Clients can check an enum to find out what kind of declaration it is and they can call functions to get more specific information than the generic provided info. llvm-svn: 144343
* Add a const version of ObjCClassDecl::getForwardDecl, no functionality change.Argyrios Kyrtzidis2011-11-111-0/+1
| | | | llvm-svn: 144342
* Move "Unqualified lookup into dependent bases of class templates" Microsoft ↵Francois Pichet2011-11-113-21/+21
| | | | | | specific behavior from -fms-extensions to -fms-compatibility. llvm-svn: 144341
* [static analyzer] be more specific when running removeDeadBindings. Instead ↵Ted Kremenek2011-11-111-1/+1
| | | | | | of seeing if the predecessor node was a non-StmtPoint, check if it is specifically a BlockEntrance node. llvm-svn: 144340
* Add top-level driver option '--serialize-diagnostics' for serialize compiler ↵Ted Kremenek2011-11-113-1/+9
| | | | | | diagnostics to a file. llvm-svn: 144339
* Implicit casts from rvalue to lvalue are not meaningful. Don't accidentally addRichard Smith2011-11-102-1/+2
| | | | | | | | | | them when performing a const conversion on the implicit object argument for a member operator call on an rvalue. No change to the testsuite: the test for this change is that the added assertion does not fire any more. llvm-svn: 144333
* [static analyzer]: only call RemoveDeadBindings() when analyzing non-Expr ↵Ted Kremenek2011-11-101-1/+24
| | | | | | stmts, entering a basic block, or analyzing non-consumed expressions. This sigificantly speeds up analysis time, and reduces analysis time down to 27% less than before we linearized the CFG. llvm-svn: 144332
OpenPOWER on IntegriCloud