summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* More fallout from r58501: primary fix is some more corrections to make Eli Friedman2008-11-022-9/+20
| | | | | | | | | | | | | | | | | the types for size_t and ptrdiff_t more accurate. I think all of these are correct, but please compare the defines for __PTRDIFF_TYPE__ and __SIZE_TYPE__ to gcc to double-check; this particularly applies to those on BSD variants, since I'm not sure what they do here; I assume here that they're the same as on Linux. Fixes wchar_t to be "int", not "unsigned int" (which I think is correct on everything but Windows). Fixes ptrdiff_t to be "int" rather than "short" on PIC16; "short" is an somewhat strange choice because it normally gets promoted, and it's not consistent with the choice for size_t. llvm-svn: 58556
* Enhance return-of-stack-address checker to recognize regions created by ↵Ted Kremenek2008-11-021-0/+9
| | | | | | alloca(). llvm-svn: 58553
* Add transfer function logic for alloca().Ted Kremenek2008-11-021-0/+10
| | | | llvm-svn: 58552
* Added AllocaRegion, which represents regions created by calls to alloca().Ted Kremenek2008-11-021-2/+35
| | | | llvm-svn: 58551
* Fixed a horrible bug in HTMLDiagnostics.cpp where bugs referencing source ↵Ted Kremenek2008-11-021-3/+3
| | | | | | ranges that occur within macros would not be emitted at all. llvm-svn: 58550
* Move IRBuilder type definition to common file.Daniel Dunbar2008-11-0110-45/+61
| | | | | | - No functionality change. llvm-svn: 58546
* Semantic checking of constructor declarations and classification of ↵Douglas Gregor2008-10-312-13/+100
| | | | | | default/copy constructors llvm-svn: 58538
* Implement basic support for converting constructors in user-defined Douglas Gregor2008-10-316-34/+200
| | | | | | | | | | | | | conversions. Notes: - Overload resolution for converting constructors need to prohibit user-defined conversions (hence, the test isn't -verify safe yet). - We still use hacks for conversions from a class type to itself. This will be the case until we start implicitly declaring the appropriate special member functions. (That's next on my list) llvm-svn: 58513
* Fix a bug that was introduced in 58501. Ideally I think we should force all ↵Anders Carlsson2008-10-311-1/+1
| | | | | | targets to set these values and not have defaults. llvm-svn: 58511
* Comment out invalid assertion. I'm leaving it in the code for now as a ↵Ted Kremenek2008-10-311-1/+3
| | | | | | reminder to produce a test case. llvm-svn: 58510
* Implement semantic checking of static_cast and dynamic_cast.Sebastian Redl2008-10-316-55/+424
| | | | llvm-svn: 58509
* Simplify interface. We can get canonical type from the base region directly. ↵Zhongxing Xu2008-10-311-21/+23
| | | | | | No need for an extra type argument. llvm-svn: 58507
* Implement struct initialization for SCA.Zhongxing Xu2008-10-311-1/+47
| | | | llvm-svn: 58506
* Implement array initialization for SCA.Zhongxing Xu2008-10-311-6/+39
| | | | llvm-svn: 58504
* Fixed build warning. No functionality change.Sanjiv Gupta2008-10-311-2/+2
| | | | llvm-svn: 58503
* Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wcharSanjiv Gupta2008-10-317-45/+83
| | | | | | | | | | etc more generic. For some targets, long may not be equal to pointer size. For example: PIC16 has int as i16, ptr as i16 but long as i32. Also fixed a few build warnings in assert() functions in CFRefCount.cpp, CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp. llvm-svn: 58501
* Add support for parsing and representing C++ constructor declarations.Douglas Gregor2008-10-318-7/+207
| | | | | | | | | | | | | | | Notes: - Constructors are never found by name lookup, so they'll never get pushed into any scope. Instead, they are stored as an OverloadedFunctionDecl in CXXRecordDecl for easy overloading. - There's a new action isCurrentClassName that determines whether an identifier is the name of the innermost class currently being defined; we use this to identify the declarator-id grammar rule that refers to a type-name. - MinimalAction does *not* support parsing constructors. - We now handle virtual and explicit function specifiers. llvm-svn: 58499
* "One" line fix for -parse-noop failure, "id" and several other thingsDaniel Dunbar2008-10-311-3/+7
| | | | | | | | were being treated as type names for non-Objective-C files. - Other lines are just because MinimalAction didn't have access to the LangOptions. llvm-svn: 58498
* Debug info: Bug fix, function types should always include the returnDaniel Dunbar2008-10-311-1/+1
| | | | | | type. llvm-svn: 58497
* Implement BindStruct and fix a bug in RetriveStruct.Zhongxing Xu2008-10-311-4/+33
| | | | llvm-svn: 58496
* Fix 80-col violations.Zhongxing Xu2008-10-311-5/+5
| | | | llvm-svn: 58495
* Implement load from struct region. Instead of returning an UnknownVal(), we ↵Zhongxing Xu2008-10-311-0/+33
| | | | | | create a CompoundVal by loading from each field of the struct. llvm-svn: 58494
* Add a tentative assertion.Zhongxing Xu2008-10-311-2/+3
| | | | llvm-svn: 58492
* Quick fix for PR2950, infinite loop generating debug info forDaniel Dunbar2008-10-312-20/+25
| | | | | | | recursive types. - Style will be clean up in further patches. llvm-svn: 58490
* Formatting tweaks.Daniel Dunbar2008-10-312-18/+17
| | | | | | - No functionality change. llvm-svn: 58488
* Fix a comment.Zhongxing Xu2008-10-311-1/+1
| | | | llvm-svn: 58487
* Use llvm::raw_string_ostream instead of std::ostringstream.Ted Kremenek2008-10-311-4/+4
| | | | llvm-svn: 58479
* Enhance path-sensitive return-of-stack-address check to print out the line ↵Ted Kremenek2008-10-311-3/+20
| | | | | | number of a compound literal (whose address is being returned) instead of printing out the hex representation of the pointer address of the CompoundLiteralExpr. llvm-svn: 58478
* Extend "followsFundamentalRule" to ignore prefix '_' characters.Ted Kremenek2008-10-301-2/+2
| | | | llvm-svn: 58469
* Handle the case in VisitInitListExprs where there are no initializers in the ↵Ted Kremenek2008-10-301-8/+15
| | | | | | compound literal. llvm-svn: 58468
* Distinguish between self.X = ... where self.X is a property reference and ↵Ted Kremenek2008-10-301-1/+2
| | | | | | self.X is an implicit call to setX. llvm-svn: 58462
* Use the correct predecessor node.Ted Kremenek2008-10-301-1/+1
| | | | llvm-svn: 58446
* Pretty-printing for SVals now mainly uses llvm::raw_ostream. We have an ↵Ted Kremenek2008-10-301-125/+9
| | | | | | adapter for std::ostream, but this will be removed in the future. llvm-svn: 58445
* Add missing return statement.Ted Kremenek2008-10-301-0/+2
| | | | llvm-svn: 58444
* Added iterators to nonloc::CompoundSVal.Ted Kremenek2008-10-301-0/+21
| | | | | | Added pretty-printing for nonloc::CompoundSVal. llvm-svn: 58442
* 80 col violation.Ted Kremenek2008-10-301-3/+3
| | | | llvm-svn: 58441
* Use a worklist in GRExprEngine::VisitInitListExpr to process subexpressions.Ted Kremenek2008-10-301-26/+55
| | | | llvm-svn: 58440
* CompoundVal now uses an ImmutableList<SVal> to store its set of SVals. This ↵Ted Kremenek2008-10-302-25/+15
| | | | | | change was motivated by the need to allow state-splitting in GRExprEngine::VisitInitListExpr. As a side-benefit, we no longer need to perform any copies of SVals when creating a CompoundSVal, and the profiling of CompoundSVal is now constant time. llvm-svn: 58437
* Patch by Nikita Zhuk:Ted Kremenek2008-10-301-11/+43
| | | | | | | | Fix PR 2978 false positive for missing release in -dealloc of an ivar retained via a property and then released by assigning nil to that property: http://llvm.org/bugs/show_bug.cgi?id=2978 llvm-svn: 58431
* Fix arithmetic type checkDouglas Gregor2008-10-301-1/+2
| | | | llvm-svn: 58429
* Merge the array and struct case. They are essentially the same.Zhongxing Xu2008-10-301-7/+1
| | | | llvm-svn: 58422
* Rename:Zhongxing Xu2008-10-305-64/+63
| | | | | | | - SetSVal(GRState*, Loc, SVal) => BindLoc - SetSVal(GRState*, Expr*, SVal) => BindExpr llvm-svn: 58421
* Implement VisitInitListExpr(). InitListExpr will have a nonloc::CompoundVal ↵Zhongxing Xu2008-10-301-0/+71
| | | | | | value. llvm-svn: 58419
* Add CompoundVal and CompoundValData for representing the value of InitListExpr.Zhongxing Xu2008-10-302-0/+43
| | | | llvm-svn: 58418
* Fix 80-col.Zhongxing Xu2008-10-301-1/+1
| | | | llvm-svn: 58417
* Mark yy_fatal_error as a panic function.Ted Kremenek2008-10-301-1/+3
| | | | llvm-svn: 58410
* Improve documentation for Sema::CheckReferenceInitDouglas Gregor2008-10-291-7/+7
| | | | llvm-svn: 58404
* NeXT: Emit protocol objects lazily.Daniel Dunbar2008-10-291-21/+76
| | | | | | | | | | - That is, the metadata for a protocol is only emitted if that protocol is actually used in the translation unit. This is important because Objective-C headers frequently contain a large number of protocol definitions, only a few of which will be used in any given file. llvm-svn: 58400
* Fix crash reported in PR2923 where a function declared using ↵Ted Kremenek2008-10-291-3/+13
| | | | | | typeof(another_function) would have FunctionDecl::getNumParams() return the number of parameters in the original function type and not the number of parameters in the actual FunctionDecl. llvm-svn: 58392
* Simplify and correct the check for function redefinitions. This does two things:Douglas Gregor2008-10-291-14/+9
| | | | | | | | | | - Allows definitions of overloaded functions :) - Eliminates extraneous error messages when we have a definition of a function that isn't an overload but doesn't have exactly the same type as the original. llvm-svn: 58382
OpenPOWER on IntegriCloud