summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make sure to use RequireCompleteType rather than testing forDouglas Gregor2009-03-243-125/+152
| | | | | | | incomplete types. RequireCompleteType is needed when the type may be completed by instantiating a template. llvm-svn: 67643
* Driver: Warn when 'clang' is used to compile a source file we couldDaniel Dunbar2009-03-241-3/+9
| | | | | | conceivably handle, but are defaulting to not using clang for. llvm-svn: 67641
* Driver: Change default use of "clang" compiler.Daniel Dunbar2009-03-241-12/+18
| | | | | | | | | | | | | | | | | | | | | | - Don't default to using clang for C++ (use -ccc-clang-cxx to override). - Default to only using clang on i386 and x86_64 (use -ccc-clang-archs "" to override). - <rdar://problem/6712350> [driver] clang should not be used on powerpc by default - <rdar://problem/6705767> driver should default to -ccc-no-clang-cxx I plan to add a warning that we are not using the clang compiler for the given compilation so that users do not think clang is being used in situations it isn't. This change is motivated by the desire to be able to drop clang into a build and have things "just work", even if it happens to get used to compile C++ code or code for an architecture we don't support yet. llvm-svn: 67640
* Move ToolChain::ShouldUseClangCompiler toDaniel Dunbar2009-03-243-30/+29
| | | | | | | Driver::ShouldUseClangCompiler. - No functionality change. llvm-svn: 67639
* Driver: Translate -fverbose-asm for LLVM backend.Daniel Dunbar2009-03-241-1/+1
| | | | | | | - <rdar://problem/6715707> driver should translate -fverbose-asm into -asm-verbose llvm-svn: 67634
* Really fix cmake style builds.Mike Stump2009-03-243-1/+7
| | | | llvm-svn: 67633
* Driver: Result files shouldn't be removed on failure when -save-tempsDaniel Dunbar2009-03-241-1/+1
| | | | | | | | is specified. - No easy way to make a safe test case for this (given where the driver is supposed to put temp files). llvm-svn: 67632
* Driver: ArgList::getLastArg was in fact returning the first matching arg.Daniel Dunbar2009-03-241-3/+1
| | | | | | | - <rdar://problem/6715818> clang doesn't honor gcc semantic that last -O optimization option wins. llvm-svn: 67628
* Fix the bug that Eli noticed where we wouldn't look at function decls ↵Anders Carlsson2009-03-242-22/+47
| | | | | | outside the class declaration. llvm-svn: 67627
* improve error recovery for when type parsing fails.Chris Lattner2009-03-241-1/+5
| | | | llvm-svn: 67626
* fix "Comment#1" from PR3872Chris Lattner2009-03-241-1/+1
| | | | llvm-svn: 67625
* random cleanups.Chris Lattner2009-03-242-18/+23
| | | | llvm-svn: 67624
* Template instantiation for constructorsDouglas Gregor2009-03-242-0/+54
| | | | llvm-svn: 67623
* change the __VERSION__ string to be more sensible. It would be useful to ↵Chris Lattner2009-03-241-2/+1
| | | | | | include the clang version # too. llvm-svn: 67619
* Driver: Forward -MMD (not -MM) to clang-cc; this got lost inDaniel Dunbar2009-03-241-1/+1
| | | | | | translation, the former we support, the later we don't (yet). llvm-svn: 67611
* Install clang-cc to libexec/clang-cc (instead of bin/clang-cc).Daniel Dunbar2009-03-241-0/+8
| | | | | | - Updated ccc & driver to look in libexec/ for tools. llvm-svn: 67607
* Support member reference on ?: of struct type.Daniel Dunbar2009-03-242-0/+21
| | | | llvm-svn: 67603
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Handle pointers to arrays of abstract types.Anders Carlsson2009-03-241-0/+9
| | | | llvm-svn: 67598
* More work on diagnosing abstract classes. We can now handle cases likeAnders Carlsson2009-03-245-14/+75
| | | | | | | | | | | | class C { void g(C c); virtual void f() = 0; }; In this case, C is not known to be abstract when doing semantic analysis on g. This is done by recursively traversing the abstract class and checking the types of member functions. llvm-svn: 67594
* Fix PR3868 by making Evaluate handle cases like "(long)&a + 4".Eli Friedman2009-03-241-6/+27
| | | | llvm-svn: 67593
* Cleanup template instantiation for methods, destructorsDouglas Gregor2009-03-241-53/+107
| | | | llvm-svn: 67585
* Driver: lipo wasn't being called correctly (translation failure fromDaniel Dunbar2009-03-241-0/+3
| | | | | | ccc due to the different way we handle output arguments). llvm-svn: 67583
* Template instantiation for destructors. This is somewhat repetitive;Douglas Gregor2009-03-241-1/+43
| | | | | | eliminating the duplication is next on the list. llvm-svn: 67579
* Fix the ABI convention for struct returns on x86 outside of Darwin.Eli Friedman2009-03-231-1/+9
| | | | llvm-svn: 67577
* Another use of adjustParameterType. Plus, GetTypeForDeclarator willDouglas Gregor2009-03-231-8/+2
| | | | | | | | always get ParmVarDecls with already-adjusted types. Assert it. Thanks, Anders! llvm-svn: 67576
* Template instantiation for the declarations of member functions withinDouglas Gregor2009-03-234-158/+289
| | | | | | | | | | | | | | | | | | | | | | a class template. At present, we can only instantiation normal methods, but not constructors, destructors, or conversion operators. As ever, this contains a bit of refactoring in Sema's type-checking. In particular: - Split ActOnFunctionDeclarator into ActOnFunctionDeclarator (handling the declarator itself) and CheckFunctionDeclaration (checking for the the function declaration), the latter of which is also used by template instantiation. - We were performing the adjustment of function parameter types in three places; collect those into a single new routine. - When the type of a parameter is adjusted, allocate an OriginalParmVarDecl to keep track of the type as it was written. - Eliminate a redundant check for out-of-line declarations of member functions; hide more C++-specific checks on function declarations behind if(getLangOptions().CPlusPlus). llvm-svn: 67575
* Deallocate 'DeclRefExpr's in correctly formed '#pragma unused'Ted Kremenek2009-03-231-0/+1
| | | | llvm-svn: 67573
* Implement '#pragma unused'.Ted Kremenek2009-03-235-7/+145
| | | | llvm-svn: 67569
* Driver: Make argument parsing fast.Daniel Dunbar2009-03-231-13/+32
| | | | | | | | | | | On a synthetic command line consisting of almost all defined options, this drops wall time from .00494 to .00336 and user time from .00258 to .00105. On the same benchmark, clang-driver is about 15% faster than the primary gcc driver and almost twice as fast as the gcc driver driver. llvm-svn: 67564
* Driver: Fix off by one in computation of first searchable option.Daniel Dunbar2009-03-231-1/+1
| | | | llvm-svn: 67552
* Must allow for strong cast of floats as well (objc2 gc).Fariborz Jahanian2009-03-231-17/+50
| | | | llvm-svn: 67551
* More improvements to abstract type checking. Handle arrays correctly, and ↵Anders Carlsson2009-03-233-6/+14
| | | | | | make sure to check parameter types before they decay. llvm-svn: 67550
* Driver: Add two special groups of "whitelisted" options which we knowDaniel Dunbar2009-03-231-0/+12
| | | | | | | | | | | | | | | | | | | | clang doesn't support, and don't want to warn are unused. Eventually these should disappear. Here is a more readable list than is in the diff: W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts, -Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces, -Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants, -Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas, -Wno-unused-parameter, -Wparentheses, -Wpointer-arith, -Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch, -Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable, -Wwrite-strings. f options: -fasm-blocks, -fmessage-length=. llvm-svn: 67549
* Driver: Check that options are ordered properly (outside ofDaniel Dunbar2009-03-231-5/+75
| | | | | | | | Release-Asserts mode). Also, avoid searching through option groups (which will never match). llvm-svn: 67548
* use isa<>Chris Lattner2009-03-231-2/+2
| | | | llvm-svn: 67543
* It's an error to try to allocate an abstract object using new.Anders Carlsson2009-03-234-5/+15
| | | | llvm-svn: 67542
* Fix PR3855. When we encounter an incompatible redeclaration of aDouglas Gregor2009-03-231-2/+5
| | | | | | | | library function, accept this declaration and pretend that we do not know that this is a library function. autoconf depends on this (broken) behavior. llvm-svn: 67541
* The individual pieces of an invalid paste as still candidates for expansion.Chris Lattner2009-03-231-1/+3
| | | | | | | This matters in assembler mode, where this is silently allowed. This fixes rdar://6709206. llvm-svn: 67539
* analyzer: Provide temporary workaround for false positive reported byTed Kremenek2009-03-231-0/+11
| | | | | | | <rdar://problem/6704930> involving SimpleConstraintManager not reasoning well about symbolic constraint values involving arithmetic operators. llvm-svn: 67534
* Tighten up the determination of whether a function declaration has aDouglas Gregor2009-03-231-1/+1
| | | | | | prototype. Thanks Eli! llvm-svn: 67533
* Thanks to Eli for pointing out my misreading of 6.2.2p5Douglas Gregor2009-03-231-2/+1
| | | | llvm-svn: 67530
* Driver: Setup file and program search paths in tool chains.Daniel Dunbar2009-03-234-12/+90
| | | | llvm-svn: 67529
* Ad FreeBSD ARM target info.Daniel Dunbar2009-03-231-0/+15
| | | | | | - Patch by Ed Schoeten! llvm-svn: 67527
* analyzer: Fix embarrassing regression in BasicStore when invalidating structTed Kremenek2009-03-232-0/+8
| | | | | | values passed-by-reference to unknown functions. llvm-svn: 67519
* Minor Evaluate cleanup; add some boilerplate implementations to Eli Friedman2009-03-231-29/+26
| | | | | | Evaluate for __extension__ and __builtin_choose_expr. llvm-svn: 67506
* Minor enhancements to Evaluate.Eli Friedman2009-03-231-13/+25
| | | | llvm-svn: 67503
* Some minor fixes for complex IRGen.Eli Friedman2009-03-231-23/+16
| | | | llvm-svn: 67501
* Fix a subtle bug in CodeGen for the increment of a bitfield.Eli Friedman2009-03-231-5/+7
| | | | llvm-svn: 67499
* Add some FIXMEs relating to incomplete types.Eli Friedman2009-03-231-3/+14
| | | | llvm-svn: 67497
OpenPOWER on IntegriCloud