summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix subtle bug in Preprocessor::AdvanceToTokenCharacter(): use '+=' instead ↵Ted Kremenek2010-01-291-1/+1
| | | | | | of '='. llvm-svn: 94830
* Fix reference binding of const lvalue references to bit-fields, whichDouglas Gregor2010-01-293-3/+214
| | | | | | | | | | | | | | | | | requires a temporary. Previously, we were building an initialization sequence that bound to the bit-field as if it were a real lvalue. Note that we previously (and still) diagnose binding of non-const references to bit-fields, as we should. There's no real way to test that this code is correct, since reference binding does not *currently* have any representation in the AST. This fix should make it easier for that to happen, so I've verified this fix with... Added InitializationSequence::dump(), to print an initialization sequence for debugging purposes. llvm-svn: 94826
* And yet another call.Anders Carlsson2010-01-291-2/+8
| | | | llvm-svn: 94824
* Another PerformCopyInitialization call bites the dust.Anders Carlsson2010-01-291-4/+12
| | | | llvm-svn: 94823
* Get rid of another old PerformCopyInitialization call.Anders Carlsson2010-01-291-4/+12
| | | | llvm-svn: 94819
* Maintain a map of regions (lexical scopes) and use it to find context for a ↵Devang Patel2010-01-292-11/+10
| | | | | | global variable. llvm-svn: 94817
* When naming a function template via a qualified-id (or any other wayDouglas Gregor2010-01-291-1/+1
| | | | | | | | that ADL is suppressed), we need to build an UnresolvedLookupExpr. Fixes PR6063, which was hitting Boost headers pretty hard. llvm-svn: 94814
* Driver/Darwin: Fix a crash when diagnosing conflicting deployment targets.Daniel Dunbar2010-01-291-4/+6
| | | | llvm-svn: 94812
* Name mangling for cast expressions, from Matthias Schiffer! Fixes PR5876.Douglas Gregor2010-01-291-0/+18
| | | | llvm-svn: 94811
* Use EmitLValueForFieldInitialization when synthesizing the copy ctor as well.Anders Carlsson2010-01-291-19/+2
| | | | llvm-svn: 94800
* Add a new EmitLValueForFieldInitialization that will be used for ↵Anders Carlsson2010-01-293-11/+27
| | | | | | initializing fields (and reference type fields in particular). llvm-svn: 94799
* Simplify EmitLValueForField - we can get whether the field is part of a ↵Anders Carlsson2010-01-295-29/+18
| | | | | | union or not from the FieldDecl (through its DeclContext). llvm-svn: 94798
* ARM/APCS ABI: Fix some problems with bit-fields in structures. After rereadingDaniel Dunbar2010-01-291-18/+18
| | | | | | | the ABI spec, this turns out to simplify the code. We still have some annoying code which mismatches the spec with regard to empty structures. llvm-svn: 94796
* Alternate format string checking: issue warnings for incomplete format ↵Ted Kremenek2010-01-292-25/+30
| | | | | | | | | | specifiers. In addition, move ParseFormatString() and FormatStringHandler() from the clang::analyze_printf to the clang namespace. Hopefully this will resolve some link errors on Linux. llvm-svn: 94794
* Simplify InitListChecker::CheckReferenceTypeAnders Carlsson2010-01-291-11/+10
| | | | llvm-svn: 94793
* Alternate format string checking: issue a warning for invalid conversion ↵Ted Kremenek2010-01-292-21/+45
| | | | | | specifiers. llvm-svn: 94792
* Add an CXXBindReferenceExpr (not used just yet).Anders Carlsson2010-01-296-0/+46
| | | | llvm-svn: 94791
* Yet another attempt to make the Linux buildbots happy. Apparently there are ↵Ted Kremenek2010-01-291-4/+7
| | | | | | differences on how nested namespaces are handled... llvm-svn: 94790
* Fixes rewriter bug rewriting byref related API where a structFariborz Jahanian2010-01-291-2/+1
| | | | | | definition comes after where it is needed. Fixes radar 7589385. llvm-svn: 94788
* Alternate format string checking: check for excess data arguments.Ted Kremenek2010-01-291-0/+11
| | | | llvm-svn: 94787
* Alternate format string checking: check if the number of format specifiers ↵Ted Kremenek2010-01-291-0/+12
| | | | | | exceeds the number of arguments. llvm-svn: 94785
* Move definition of FormatStringHandler::~FormatStringHandler() within ↵Ted Kremenek2010-01-291-1/+1
| | | | | | namespace directives. Hopefully this will make the Linux buildbots happy. llvm-svn: 94784
* Alternate format string checking: warn of '%n' as being potentially insecure.Ted Kremenek2010-01-291-1/+11
| | | | llvm-svn: 94782
* Add precision/field width checking to AlternateCheckPrintfString().Ted Kremenek2010-01-292-7/+74
| | | | llvm-svn: 94774
* Fix off-by-one error in ParseFormatSpecifier() when reporting the location ↵Ted Kremenek2010-01-281-3/+2
| | | | | | of a null character. llvm-svn: 94762
* Start fleshing out Sema::AlternateCheckPrintfString():Ted Kremenek2010-01-282-2/+99
| | | | | | | | | | - Add an anonymous class 'CheckPrintfHandler' which will do the checking of specific format specifiers - Add checking for using the '@' conversion specifier outside an ObjC string literal - Add checking for null characters within the string llvm-svn: 94761
* s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid ↵Devang Patel2010-01-282-7/+8
| | | | | | confusion. llvm-svn: 94760
* Fix indentation.Devang Patel2010-01-281-30/+30
| | | | llvm-svn: 94758
* Static methods do not need "this" pointer argument.Devang Patel2010-01-281-0/+5
| | | | llvm-svn: 94756
* Emit base classes info first, as expected by the debugger.Devang Patel2010-01-281-3/+3
| | | | llvm-svn: 94755
* Fix an incorrect union layout assert. Fixes PR6164.Anders Carlsson2010-01-281-1/+6
| | | | llvm-svn: 94754
* s/FunctionNames/DebugInfoNames/gDevang Patel2010-01-282-4/+4
| | | | llvm-svn: 94753
* Emit vtable info.Devang Patel2010-01-282-1/+82
| | | | llvm-svn: 94751
* Access control for surrogate function calls. Required a moderately gross hackJohn McCall2010-01-282-3/+8
| | | | | | to get the access bits set properly in conversion sets. llvm-svn: 94744
* Introduce serialization and deserialization of diagnostic informationDouglas Gregor2010-01-284-2/+257
| | | | | | | | | | | | | | | | | so that CIndex can report diagnostics through the normal mechanisms even when executing Clang in a separate process. This applies both when performing code completion and when using ASTs as an intermediary for clang_createTranslationUnitFromSourceFile(). The serialized format is not perfect at the moment, because it does not encapsulate macro-instantiation information. Instead, it maps all source locations back to the instantiation location. However, it does maintain source-range and fix-it information. To get perfect fidelity from the serialized format would require serializing a large chunk of the source manager; at present, it isn't clear if this code will live long enough for that to matter. llvm-svn: 94740
* Add position of conversion specifier character to 'ConversionSpecifier'.Ted Kremenek2010-01-281-26/+31
| | | | llvm-svn: 94739
* Rename namespace clang::printf to clang::analyze_printf to avoid problems ↵Ted Kremenek2010-01-281-4/+4
| | | | | | where the reference to 'printf' is ambiguous. llvm-svn: 94733
* Access control for overloaded call operators. Not for surrogates yet,John McCall2010-01-281-0/+5
| | | | | | | | mostly because we're going to want a better diagnostic for conversions. Also this API needs to go back to sanity. llvm-svn: 94730
* Access checking for overloaded operators.John McCall2010-01-283-5/+32
| | | | llvm-svn: 94725
* Fixes a rewrite bug rewriting nested ivars reference.Fariborz Jahanian2010-01-282-6/+11
| | | | | | (Radar 7583971). llvm-svn: 94724
* Add placeholder function in Sema for new format string checking logic.Ted Kremenek2010-01-282-1/+25
| | | | | | | | This function will use the format string parsing logic in libAnalysis, and once it is shown to be better than the current implementation it will replace AlternateCheckPrintfString() entirely. llvm-svn: 94721
* Fix 80 col violation.Ted Kremenek2010-01-281-1/+3
| | | | llvm-svn: 94717
* Allow HandleFormatSpecifier() to indicate that no more processing of the ↵Ted Kremenek2010-01-281-1/+2
| | | | | | format string is desired. llvm-svn: 94715
* Add '@' conversion specifier.Ted Kremenek2010-01-281-4/+5
| | | | llvm-svn: 94713
* While emitting debugging infor for a C++ class, identify the holder of ↵Devang Patel2010-01-281-1/+11
| | | | | | class's vtable, if any. llvm-svn: 94712
* Include "this" pointer argument while emitting debug info for a C++ method.Devang Patel2010-01-282-1/+41
| | | | llvm-svn: 94710
* Remove invalid conversion specifiers from format string checking.Ted Kremenek2010-01-282-10/+0
| | | | llvm-svn: 94707
* Add a few more conversion specifiers to ParseFormatSpecifier (these appear ↵Ted Kremenek2010-01-281-20/+27
| | | | | | in SemaChecking). llvm-svn: 94704
* Add skeleton for a more structured way to analyzing pring formatTed Kremenek2010-01-272-0/+240
| | | | | | | | | | | | | | | | | | | | | | strings than what we currently have in Sema. This is both an experiment and a WIP. The idea is simple: parse the format string incrementally, constructing a well-structure representation of each format specifier. Each format specifier is then handed back one-by-one to a client via a callback. Malformed format strings are also handled with callbacks. The idea is to separate the parsing of the format string from the emission of diagnostics. Currently what we have in Sema for handling format strings is a mongrel of both that is hard to follow and difficult to modify (I can apply this label since I'm the original author of that code). This is in libAnalysis as it is reasonable generic and can potentially be used both by libSema and libChecker. Comments welcome. llvm-svn: 94702
* Remove ModuleProviders from clang after r94686 removed them from LLVM.Jeffrey Yasskin2010-01-271-8/+4
| | | | llvm-svn: 94688
OpenPOWER on IntegriCloud