summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a DebugLoc parameter to TargetInstrInfo::InsertBranch(). ThisStuart Hastings2010-06-1734-126/+137
| | | | | | | | | | | | addresses a longstanding deficiency noted in many FIXMEs scattered across all the targets. This effectively moves the problem up one level, replacing eleven FIXMEs in the targets with eight FIXMEs in CodeGen, plus one path through FastISel where we actually supply a DebugLoc, fixing Radar 7421831. llvm-svn: 106243
* Do not treat @selector as lvalue (unlike g++).Fariborz Jahanian2010-06-174-3/+18
| | | | | | Patch by Nico Weber (pr7390). llvm-svn: 106242
* Improves RecursiveASTVisitor:Zhanyong Wan2010-06-171-19/+58
| | | | | | | | | | | | | | | * refactors code in DEF_TRAVERSE_DECL() into TraverseDeclContextHelper() to reduce code bloat and facilitate reuse. * makes the order of traversing a FunctionDecl (including its subclasses)'s children more natural: before the function parameters are visited after the function body; now they are visited after the function type and before the function body. * fixes a double count for function return type and arguments. Reviewed by chandlerc and csilvers. llvm-svn: 106236
* Objective-c++ IRGen. Support for @selector expression asFariborz Jahanian2010-06-177-13/+52
| | | | | | an lvalue. Fixes PR7390. llvm-svn: 106235
* Minor clarification.Dan Gohman2010-06-171-1/+1
| | | | llvm-svn: 106234
* Bug 7377: Fixed several bad printf format string bugs.Tom Care2010-06-175-78/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added warning for undefined behavior when using field specifier - Added warning for undefined behavior when using length modifier - Fixed warnings for invalid flags - Added warning for ignored flags - Added fixits for the above warnings - Fixed accuracy of detecting several undefined behavior conditions - Receive normal warnings in addition to security warnings when using %n - Fix bug where '+' flag would remain on unsigned conversion suggestions Summary of changes: - Added expanded tests - Added/expanded warnings - Added position info to OptionalAmounts for fixits - Extracted optional flags to a wrapper class with position info for fixits - Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior - Fixed conversion specifier checking to conform to C99 standard - Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier Note: warnings involving the ' ' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly. M test/Sema/format-strings.c M include/clang/Basic/DiagnosticSemaKinds.td M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp M lib/Sema/SemaChecking.cpp llvm-svn: 106233
* add missing break. inconsequential as the code shouldn't be reached, butJim Grosbach2010-06-171-0/+1
| | | | | | for correctness' sake, it should be there. llvm-svn: 106229
* Add entries for Expanding atomic intrinsics to libcalls. Just a placeholderJim Grosbach2010-06-171-0/+19
| | | | | | | | | | | | | | for the moment. The implementation of the libcall will follow. Currently, the llvm-gcc knows when the intrinsics can be correctly handled by the back end and only generates them in those cases, issuing libcalls directly otherwise. That's too much coupling. The intrinsics should always be generated and the back end decide how to handle them, be it with a libcall, inline code, or whatever. This patch is a step in that direction. rdar://8097623 llvm-svn: 106227
* Testcase for llvm-gcc 106225.Dale Johannesen2010-06-171-0/+16
| | | | llvm-svn: 106226
* When pushing a copy of the TypeLoc information for a dependentDouglas Gregor2010-06-172-1/+18
| | | | | | | template specialization type, copy the location information but use the new type. Fixes PR7385. llvm-svn: 106224
* Use UnaryOperator as the representation of dependent expressions whenDouglas Gregor2010-06-171-0/+6
| | | | | | | no overloaded operators were found in scope, mirroring what we already do for BinaryOperator. llvm-svn: 106222
* Remove arm_apcscc from the test files. It is the default and doing thisRafael Espindola2010-06-17110-358/+358
| | | | | | matches what llvm-gcc and clang now produce. llvm-svn: 106221
* Update CMake build system for ARM NEON generation.Douglas Gregor2010-06-175-6/+12
| | | | llvm-svn: 106220
* Allow absolute paths in LLVM_TARGET_DEFINITIONS for CMake's TableGen ruleDouglas Gregor2010-06-171-1/+7
| | | | llvm-svn: 106219
* Some fixes to type-visiting -- a few places where the type-name wasCraig Silverstein2010-06-171-19/+34
| | | | | | | | | | | | | | explicitly typed in the source, but we weren't recursing on it. One is new <type>, the other is <type>() (eg int()). I also fixed the initializer parsing to parse on the syntactic initializer list, not the semantic. Usually they'll be identical, so this won't affect much in practice, but keeps the AST as a syntax-tree visitor. Reviewed by chandlerc. llvm-svn: 106218
* Fix typo (test commit)Peter Collingbourne2010-06-171-1/+1
| | | | llvm-svn: 106217
* fix some more gcc3.4 constness warningsGabor Greif2010-06-173-3/+4
| | | | llvm-svn: 106216
* use typedef to make hack more transparent and also appease gcc3.4 constness ↵Gabor Greif2010-06-171-2/+4
| | | | | | warning llvm-svn: 106215
* Make sure the caching mechanism in Parser::ParseLexedMethodDefs is robust ↵Argyrios Kyrtzidis2010-06-171-4/+16
| | | | | | against the parser reading too few tokens. llvm-svn: 106214
* Make sure parens/braces/brackets are correctly balanced.Argyrios Kyrtzidis2010-06-175-1/+34
| | | | | | | | | | | In a line like: (; the semicolon leaves Parser:ParenCount unbalanced (it's 1 even though we stopped looking for a right paren). This may affect later parsing and result in bad recovery for parsing errors. llvm-svn: 106213
* Don't ast-print the builtin __[u]int128_t.Argyrios Kyrtzidis2010-06-171-4/+9
| | | | llvm-svn: 106212
* Mangle operator names in the Microsoft C++ Mangler.Charles Davis2010-06-172-1/+135
| | | | llvm-svn: 106211
* Tweak stack address checker to report multiple cases where globals may ↵Ted Kremenek2010-06-173-53/+78
| | | | | | | | reference stack memory. Also refactor the diagnostics so that we print out the kind of stack memory returned. llvm-svn: 106210
* Include the bug description in the report hash so that we can emit multiple ↵Ted Kremenek2010-06-171-0/+1
| | | | | | | | bugs of the same type at the same location. llvm-svn: 106209
* Generate arm_neon.inc in include/clang/Basic, which provides:Nate Begeman2010-06-176-493/+17
| | | | | | | | | 1. builtins definitions for BuiltinsARM.def 2. intrinsic validation code for SemaChecking Unsure as to whether this is the best way to handle the make dependencies or not. llvm-svn: 106208
* Modify tablegen to support generating all NEON code used by clang at once.Nate Begeman2010-06-172-89/+135
| | | | llvm-svn: 106207
* Remove last of the bool shifts for MS VC++, patch by dimitry andricNate Begeman2010-06-172-13/+13
| | | | llvm-svn: 106206
* Thumb1 and any pre-v6 ARM target should use the libcall expansion ofJim Grosbach2010-06-171-1/+6
| | | | | | ISD::MEMBARRIER. v7 and v7 ARM mode continue to use the custom lowering. llvm-svn: 106204
* ISD::MEMBARRIER should lower to a libcall (__sync_synchronize) if the targetJim Grosbach2010-06-171-1/+13
| | | | | | sets the legalize action to Expand. llvm-svn: 106203
* Comment Attr.td so people have a better understanding of what goes on.Alexis Hunt2010-06-171-2/+17
| | | | | | Also removed the unused Aliases member. llvm-svn: 106202
* Fix the handling of !if result, avoiding null results for non 'int'.Bruno Cardoso Lopes2010-06-171-4/+6
| | | | llvm-svn: 106201
* simplify code a bit and add a more explanatory assert for cases thatJim Grosbach2010-06-171-15/+11
| | | | | | previously would result in 'cannot yet select' errors. llvm-svn: 106199
* Add the entire range of DW_OP_lit[0..31], DW_OP_reg[0..31], and Jason Molenda2010-06-172-212/+386
| | | | | | | | | DW_OP_breg[0..31] to Dwarf.h. Add "DW_" prefix to the llvm::dwarf::*String methods which did not already have them in Dwarf.cpp. llvm-svn: 106197
* Fix format string checking of '%c' by treating it as an integer conversion. ↵Ted Kremenek2010-06-173-1/+5
| | | | | | Fixes PR 7391. llvm-svn: 106196
* Per conversation with Doug, remove two assertions in ParseLexedMethodDefs() thatTed Kremenek2010-06-171-5/+3
| | | | | | didn't indicate violated invariants but that we weren't recovering well. llvm-svn: 106195
* Hack to let the move lowering handle dynamic-no-pic absolute moves ofEric Christopher2010-06-171-4/+15
| | | | | | | | | TLVP: movl _a@TLVP, %eax Daniel: Please review if you get a chance. llvm-svn: 106194
* Fix yet another CMake typo. I'm not quite sure how this succeeded locally now.Alexis Hunt2010-06-171-1/+1
| | | | llvm-svn: 106193
* Fix comment, per Chris' suggestion.Owen Anderson2010-06-171-1/+4
| | | | llvm-svn: 106192
* Update comment.Eric Christopher2010-06-171-1/+2
| | | | llvm-svn: 106191
* Fix a typo in the previous commit I thought I'd fixed, but apparently didn't.Alexis Hunt2010-06-171-1/+1
| | | | llvm-svn: 106189
* Update CMake build for new attribute changes.Alexis Hunt2010-06-1711-8/+30
| | | | llvm-svn: 106188
* Just getting our toes wet on <regex>Howard Hinnant2010-06-1732-0/+2775
| | | | llvm-svn: 106187
* Unstick the -r option for the disassemble command.Sean Callanan2010-06-171-0/+1
| | | | llvm-svn: 106186
* For a tablegen expression such as !if(a,b,c), let 'a'Bruno Cardoso Lopes2010-06-173-3/+17
| | | | | | be evaluated for 'bit' operators llvm-svn: 106185
* Rework StackAddrLeakChecker to find stores of stack memory addresses to ↵Ted Kremenek2010-06-172-39/+64
| | | | | | | | | | | | | | | | global variables by inspecting the Store bindings instead of iterating over all the global variables in a translation unit. By looking at the store directly, we avoid cases where we cannot directly load from the global variable, such as an array (which can result in an assertion failure) and it also catches cases where we store stack addresses to non-scalar globals. Also, but not iterating over all the globals in the translation unit, we maintain cache locality, and the complexity of the checker becomes restricted to the complexity of the analyzed function, and doesn't scale with the size of the translation unit. This fixes PR 7383. llvm-svn: 106184
* Implement RegionStoreManager::iterBindings(). This implementation only ↵Ted Kremenek2010-06-171-6/+11
| | | | | | | | | | returns the base region in the binding key instead of the region + offset. It isn't clear if this is the best semantics, but most clients will likely only care about simple bindings, or bindings to a particular variable. We can refine later if necessary. llvm-svn: 106183
* Correctly return early from BasicStoreManager::iterBindings() when the ↵Ted Kremenek2010-06-171-1/+2
| | | | | | BindingsHandler returns false. llvm-svn: 106182
* Fix the typo in my previous one-line commit.Alexis Hunt2010-06-171-1/+1
| | | | llvm-svn: 106179
* Make sure CMake can build the files added by my previous commit.Alexis Hunt2010-06-161-0/+1
| | | | llvm-svn: 106178
* When parsing cached C++ method declarations/definitions, save theDouglas Gregor2010-06-162-0/+8
| | | | | | | | "previous token" location at the end of the class definition. This eliminates a badly-placed error + Fix-It when the ';' following a class definition is missing. Fixes <rdar://problem/8066414>. llvm-svn: 106175
OpenPOWER on IntegriCloud