summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fake support for -print-multi-*Daniel Dunbar2009-06-161-0/+41
| | | | | | | - I think we will eventually need to support this for realz, and some build processes seem to depend on these options. llvm-svn: 73581
* Since integral template arguments can't have dependent types we don't need ↵Anders Carlsson2009-06-161-32/+9
| | | | | | an extra pass to set the right APSInt bit width/signedness. llvm-svn: 73580
* Make DeduceNonTypeTemplateArgument take an APSInt instead of an APInt.Anders Carlsson2009-06-161-14/+9
| | | | llvm-svn: 73574
* RegionStoreManager:Ted Kremenek2009-06-161-198/+272
| | | | | | | | | | - Add "sections" to RegionStoreManager.cpp to delineate functionality. - Add new function "CreateFieldsOnlyRegionStoreManager" that uses the new RegionStoreFeatures class to use a reduced set of features from RegionStoreManager (in this case, only field-sensitivity). This isn't completely hooked up yet. llvm-svn: 73572
* Fix typo in prev commit.Daniel Dunbar2009-06-161-1/+1
| | | | llvm-svn: 73556
* Darwin/Driver: Also look at -arch command line options when finding the defaultDaniel Dunbar2009-06-161-8/+26
| | | | | | tool chain. llvm-svn: 73555
* Update Clang to include the InitializeAllTargets andDouglas Gregor2009-06-161-1/+6
| | | | | | | InitializeAllAsmPrinters LLVM headers. Also includes some minor fixes for the CMake-based build with Xcode. llvm-svn: 73544
* It is possible that main input file does not have any symbol with debug ↵Devang Patel2009-06-162-21/+43
| | | | | | | | info. To handle this edge case, always create main compile unit first. This fixes PR 4228. llvm-svn: 73520
* follow-on to my patch: some targets (like sparc) do notChris Lattner2009-06-161-0/+2
| | | | | | | have target-specific builtins, and do not set the count. Just default to 0 for these targets. llvm-svn: 73510
* Implements -Wundeclared-selector for ObjC.Fariborz Jahanian2009-06-161-0/+8
| | | | llvm-svn: 73495
* my refactoring of builtins changed target-specific builtins to only beChris Lattner2009-06-162-5/+6
| | | | | | | | | registered when PCH wasn't being used. We should always install (in BuiltinInfo) information about target-specific builtins, but we shouldn't register any builtin identifier infos. This fixes the build of apps that use PCH and target specific builtins together. llvm-svn: 73492
* Use canonical type for building ElementRegion. Otherwise ElementRegions cannotZhongxing Xu2009-06-164-15/+21
| | | | | | be unique. llvm-svn: 73482
* Do not invalidate unboundable regions in GRSimpleVals::EvalCall().Zhongxing Xu2009-06-161-3/+5
| | | | llvm-svn: 73474
* Handle temporaries in default arguments.Anders Carlsson2009-06-167-12/+38
| | | | llvm-svn: 73462
* Keep track of whether a type parameter type is a parameter pack.Anders Carlsson2009-06-163-8/+12
| | | | llvm-svn: 73452
* Add a comment to Sema::ActOnTranslationUnitScope().Steve Naroff2009-06-161-0/+1
| | | | llvm-svn: 73450
* Fix: <rdar://problem/6945561> -[CIContext createCGLayerWithSize:info:] ↵Ted Kremenek2009-06-151-2/+5
| | | | | | misinterpreted by clang scan-build llvm-svn: 73415
* Fix: <rdar://problem/6961230> add knowledge of IOKit functions to ↵Ted Kremenek2009-06-151-3/+57
| | | | | | retain/release checker llvm-svn: 73411
* PR4395: Don't detect token concatenation in C mode for Eli Friedman2009-06-151-3/+5
| | | | | | C++-specific tokens. llvm-svn: 73408
* More XML output support, from Olaf Krzikalla!Douglas Gregor2009-06-155-302/+436
| | | | llvm-svn: 73402
* More parameter pack work.Anders Carlsson2009-06-152-13/+16
| | | | llvm-svn: 73395
* Add a new 'Pack' argument kind to TemplateArgument. This is not yet used.Anders Carlsson2009-06-155-0/+46
| | | | llvm-svn: 73391
* Base SFINAE error suppression counting on the class of an error, notDouglas Gregor2009-06-152-19/+3
| | | | | | its (possibly-remapped) diagnostics. Thanks, Chris! llvm-svn: 73390
* PR4388: get rid of an extra # line directive; in addition to being Eli Friedman2009-06-151-5/+1
| | | | | | | unnecessary, this was causing issues for assembler-with-cpp mode, which doesn't process the directive. llvm-svn: 73382
* Minor tweak to -fdiagnostics-print-source-range-info to make it printChris Lattner2009-06-151-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ranges more similar to the console output. Consider: #define FOO(X, Y) X/ Y void foo(int *P, int *Q) { FOO(P, Q); } Before we emitted: t.c:4:3:{4:3-4:6}{4:3-4:6}: error: invalid operands to binary expression ('int *' and 'int *') FOO(P, Q); ^~~~~~~~~ ... Note that while we underline the macro args that the range info just includes FOO without its macros. This change teaches the printed ranges to include macro args also so that we get: t.c:4:3:{4:3-4:12}{4:3-4:12}: error: invalid operands to binary expression ('int *' and 'int *') FOO(P, Q); ^~~~~~~~~ ... This fixes rdar://6939599 llvm-svn: 73378
* Fix #pragma GCC system_header by making it insert a virtual linemarker intoChris Lattner2009-06-151-2/+16
| | | | | | | the file at the point of the pragma. This allows clang to know that all sourcelocations after the pragma are in a system header. llvm-svn: 73376
* If PCH refers to a file that doesn't exist anymore, emit a nice errorChris Lattner2009-06-151-3/+10
| | | | | | | | like: fatal error: could not find file '1.h' referenced by PCH file instead of aborting with an assertion failure, PR4219 llvm-svn: 73371
* use the new Path::isAbsolute function, fixing a fixme. Patch by Gregory ↵Chris Lattner2009-06-151-3/+1
| | | | | | Curfman! llvm-svn: 73370
* no really, add the lines :)Chris Lattner2009-06-151-1/+1
| | | | llvm-svn: 73367
* Fix PR2741 by making our newline tracking be aware of newlines thatChris Lattner2009-06-151-0/+35
| | | | | | can occur in the middle of comment tokens. llvm-svn: 73365
* "GCC emits an __objc_class_name_{classname} symbol for every class, and a ↵Chris Lattner2009-06-151-4/+29
| | | | | | | | corresponding reference to this symbol for every compilation unit that references the class. This causes linker errors when you try linking a program which references some classes but doesn't define them. The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly." Patch by David Chisnall! llvm-svn: 73364
* PR4391: Tweak -ast-print output to generate valid output for edge cases Eli Friedman2009-06-141-1/+7
| | | | | | like "int x = + +3;". llvm-svn: 73356
* PR4390: Make sure to handle anonymous unions correctly while building Eli Friedman2009-06-141-5/+2
| | | | | | static intializers for structs. llvm-svn: 73349
* Introduce a SFINAE "trap" that keeps track of the number of errorsDouglas Gregor2009-06-143-3/+45
| | | | | | | | | | that were suppressed due to SFINAE. By checking whether any errors occur at the end of template argument deduction, we avoid the possibility of suppressing an error (due to SFINAE) and then recovering so well that template argument deduction never detects that there was a problem. Thanks to Eli for the push in this direction. llvm-svn: 73336
* Update LLVM.Douglas Gregor2009-06-144-9/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | Implement support for C++ Substitution Failure Is Not An Error (SFINAE), which says that errors that occur during template argument deduction do *not* produce diagnostics and do not necessarily make a program ill-formed. Instead, template argument deduction silently fails. This is currently implemented for template argument deduction during matching of class template partial specializations, although the mechanism will also apply to template argument deduction for function templates. The scheme is simple: - If we are in a template argument deduction context, any diagnostic that is considered a SFINAE error (or warning) will be suppressed. The error will be propagated up the call stack via the normal means. - By default, all warnings and errors are SFINAE errors. Add the NoSFINAE class to a diagnostic in the .td file to make it a hard error (e.g., for access-control violations). Note that, to make this fully work, every place in Sema that emits an error *and then immediately recovers* will need to check Sema::isSFINAEContext() to determine whether it must immediately return an error rather than recovering. llvm-svn: 73332
* PR4351: Add constant evaluation for constructs like "foo == NULL", where Eli Friedman2009-06-141-8/+29
| | | | | | foo has a constant address. llvm-svn: 73321
* Sink the BuiltinInfo object from ASTContext into theChris Lattner2009-06-149-18/+16
| | | | | | | | preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. llvm-svn: 73319
* move the various builtins stuff from libast to libbasic. ThisChris Lattner2009-06-145-9/+8
| | | | | | fixes a layering violation in lib/Basic/Targets.cpp. llvm-svn: 73318
* prune #includes, Builtins.h/cpp no longer depends on libast.Chris Lattner2009-06-141-2/+0
| | | | llvm-svn: 73317
* move GetBuiltinType from Builtin::Context to ASTContext.Chris Lattner2009-06-144-201/+207
| | | | llvm-svn: 73316
* change ParseStatementOrDeclaration to emit the 'missing ;' withChris Lattner2009-06-141-1/+5
| | | | | | | | | | | | | | | | | | | ExpectAndConsume instead of custom diag logic. This gets us an insertion hint and positions the ; at the end of the line instead of on the next token. Before: t.c:5:1: error: expected ';' after return statement } ^ after: t.c:4:11: error: expected ';' after return statement return 4 ^ ; llvm-svn: 73315
* improve localizability by not passing english phrases into Chris Lattner2009-06-142-11/+12
| | | | | | diagnostics in some cases. llvm-svn: 73314
* Simplify mangleFunctionDecl by unnesting a crazy condition. This fixesChris Lattner2009-06-131-13/+14
| | | | | | | the check for extern "c" system headers, which should prevent functiondecls from being mangled. llvm-svn: 73311
* Fix the calling convention for structs/unions containing SSE vectors on Eli Friedman2009-06-131-4/+34
| | | | | | x86-32. This is slightly messy, but I think it's consistent with gcc. llvm-svn: 73306
* Have CheckClassTemplatePartialSpecializationArgs take a ↵Anders Carlsson2009-06-132-9/+12
| | | | | | TemplateArgumentListBuilder. No functionality change. llvm-svn: 73297
* Allow initializing a vector with a vector in addition to allowing a list Eli Friedman2009-06-131-1/+1
| | | | | | of the elements. Issue reported on cfe-dev by Mattias Holm. llvm-svn: 73292
* implement and document a new __has_feature and __has_builtin magic Chris Lattner2009-06-131-13/+82
| | | | | | | | | builtin preprocessor macro. This appears to work with two caveats: 1) builtins are registered in -E mode, and 2) target-specific builtins are unconditionally registered even if they aren't supported by the target (e.g. SSE4 builtin when only SSE1 is enabled). llvm-svn: 73289
* Fix for PR4382: allow instantiating dependent nested name specifiers. Eli Friedman2009-06-131-1/+1
| | | | | | | | I'm not completely sure this is the right way to fix this issue, but it seems reasonable, and it's consistent with the non-template code for this construct. llvm-svn: 73285
* If a CXXRecordDecl is a class template, the 'this' type should be the ↵Anders Carlsson2009-06-131-1/+6
| | | | | | injected class name type. Fixes pr4383. llvm-svn: 73284
* More work on type parameter packs.Anders Carlsson2009-06-132-4/+27
| | | | llvm-svn: 73281
OpenPOWER on IntegriCloud