summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmt.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* ArrayRefize a CompoundStmt constructor.Nico Weber2012-12-291-3/+4
| | | | llvm-svn: 171238
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-6/+6
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Remove redundant (duplicated) check.Dmitri Gribenko2012-11-181-1/+1
| | | | llvm-svn: 168293
* Fixed LabelDecl source range.Abramo Bagnara2012-10-151-1/+3
| | | | llvm-svn: 165976
* If the range in a for range statement doesn't have a viable begin/end function,Richard Smith2012-09-201-27/+45
| | | | | | | | | | | | | but can be dereferenced to form an expression which does have viable begin/end functions, then typo-correct the range, even if something else goes wrong with the statement (such as inaccessible begin/end or the wrong type of loop variable). In order to ensure we recover correctly and produce any followup diagnostics in this case, redo semantic analysis on the for-range statement outside of the diagnostic trap, after issuing the typo-correction. llvm-svn: 164323
* Clarified diagnostics for range-based for loops with invalid rangesSam Panzer2012-09-061-0/+6
| | | | llvm-svn: 163350
* Revert r163083 per chandlerc's request.Joao Matos2012-09-041-6/+0
| | | | llvm-svn: 163149
* Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos2012-09-021-0/+6
| | | | | | Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. llvm-svn: 163083
* don't warn about unused values when the unused value is a statement ↵Chris Lattner2012-08-311-0/+7
| | | | | | expression expanded from a macro. This is of dubious utility in general, but is specifically a major issue for the linux kernel. This resolves PR13747. llvm-svn: 163034
* Now that ASTMultiPtr is nothing more than a array reference, make it a ↵Benjamin Kramer2012-08-231-3/+3
| | | | | | | | MutableArrayRef. This required changing all get() calls to data() and using the simpler constructors. llvm-svn: 162501
* Rip out remnants of move semantic emulation and smart pointers in Sema.Benjamin Kramer2012-08-231-2/+2
| | | | | | | These were nops for quite a while and only lead to confusion. ASTMultiPtr now behaves like a proper dumb array reference. llvm-svn: 162475
* Better diagnostics for range-based for loops with bad range types.Sam Panzer2012-08-211-112/+158
| | | | | | | | | | | | | The old error message stating that 'begin' was an undeclared identifier is replaced with a new message explaining that the error is in the range expression, along with which of the begin() and end() functions was problematic if relevant. Additionally, if the range was a pointer type or defines operator*, attempt to dereference the range, and offer a FixIt if the modified range works. llvm-svn: 162248
* [ms-inline asm] Extract AsmStmt handling into a separate file, so as to notChad Rosier2012-08-171-611/+0
| | | | | | pollute SemaStmt with extraneous asm handling logic. llvm-svn: 162132
* [ms-inline asm] Instantiate the MCStreamer as a NullStream. We're parsingChad Rosier2012-08-171-1/+1
| | | | | | instruction, not emitting them, so a NullStream is fine. llvm-svn: 162105
* [ms-inline asm] Comment.Chad Rosier2012-08-161-1/+2
| | | | llvm-svn: 162055
* [ms-inline asm] Extract a helper function, getSpelling(). Also use this onChad Rosier2012-08-161-14/+16
| | | | | | tokens we don't know how to handle; this should aid when debugging. llvm-svn: 162053
* [ms-inline asm] If we don't know how to handle a token then assume this is not aChad Rosier2012-08-161-1/+1
| | | | | | simple asm. llvm-svn: 162051
* [ms-inline asm] Add a helper function, isMSAsmKeyword().Chad Rosier2012-08-161-1/+26
| | | | | | | | These require special handling, which we don't currently handle. This is being put in place to ensure we don't do invalid symbol table lookups or try to parse invalid assembly. The test cases just makes sure the latter isn't happening. llvm-svn: 162050
* Removed unused LParenLoc parameter to ActOnCXXForRangeStmtSam Panzer2012-08-161-6/+4
| | | | llvm-svn: 162048
* [ms-inline asm] Perform symbol table lookup on variables. The idea is to useChad Rosier2012-08-161-8/+30
| | | | | | | this information to determine valid MC operands. This will also be used for semantic analysis. llvm-svn: 162043
* [ms-inline asm] Start tracking which tokens are registers and which areChad Rosier2012-08-161-4/+28
| | | | | | | | variables, function or label references. The former is a potential clobber. The latter is either an input or an output. Unfortunately, it's difficult to test this patch at the moment, but the added test case will eventually do so. llvm-svn: 162026
* [ms-inline asm] Add inputs and outputs to AST. No functional change.Chad Rosier2012-08-161-10/+11
| | | | llvm-svn: 162000
* [ms-inline asm] Use a set container to remove redundant clobbers.Chad Rosier2012-08-151-6/+7
| | | | llvm-svn: 161991
* [ms-inline asm] Address a FIXME by computing the number of asm statements whenChad Rosier2012-08-151-10/+7
| | | | | | building the AsmString. llvm-svn: 161988
* [ms-inline asm] MSVC parses multiple __asm statements on a single line as oneChad Rosier2012-08-151-8/+29
| | | | | | | | | | | | statement. For example, if (x) __asm out dx, ax __asm out dx, ax results in a single inline asm statement (i.e., both "out dx, ax" statements are predicated on if(x)). llvm-svn: 161986
* [ms-inline asm] Don't emit newlines as these are ignored by the AsmParserChad Rosier2012-08-151-4/+1
| | | | | | anyways. Also, simplify some conditional logic. llvm-svn: 161977
* [ms-inline asm] Capturing loop-scoped (std::string)Reg with a StringRef is bad.Chad Rosier2012-08-151-3/+5
| | | | llvm-svn: 161966
* [ms-inline asm] Add the left brace source location and improve the prettyChad Rosier2012-08-151-7/+9
| | | | | | printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>. llvm-svn: 161958
* clang/lib/Sema/SemaStmt.cpp: Include MCAsmLexer.h to appease msvc to define ↵NAKAMURA Takumi2012-08-151-0/+1
| | | | | | llvm::AsmToken. llvm-svn: 161927
* [ms-inline asm] Have MC start parsing the asms.Chad Rosier2012-08-151-1/+52
| | | | llvm-svn: 161913
* [ms-inline asm] Remove the last bits of LineEnds.Chad Rosier2012-08-141-6/+5
| | | | llvm-svn: 161904
* [ms-inline asm] Simplify more logic by using the Token::hasLeadingSpace() andChad Rosier2012-08-141-47/+10
| | | | | | Token::isAtStartOfLine() APIs. llvm-svn: 161898
* [ms-inline asm] Address a potential buffer overflow.Chad Rosier2012-08-141-5/+2
| | | | llvm-svn: 161896
* [ms-inline asm] Simplify the logic in patchMSAsmString. We no longer need toChad Rosier2012-08-141-46/+55
| | | | | | track the LineEnds now that single line asm statments aren't merged. llvm-svn: 161893
* [ms-inline asm] Add a helpful assert.Chad Rosier2012-08-131-0/+1
| | | | llvm-svn: 161796
* [ms-inline asm] Address a potential buffer overflow.Chad Rosier2012-08-131-5/+1
| | | | llvm-svn: 161793
* [ms-inline asm] Have patchMSAsmStrings() return a vector or AsmStrings.Chad Rosier2012-08-131-62/+79
| | | | | | | | | | | | | | | | | | | | | | | | | The AsmParser expects a single asm instruction, but valid ms-style inline asm statements may contain multiple instructions. This happens with asm blocks __asm { mov ebx, eax mov ecx, ebx } or when multiple asm statements are adjacent to one another __asm mov ebx, eax __asm mov ecx, ebx and __asm mov ebx, eax __asm mov ecx, ebx Currently, asm blocks are not properly handled. llvm-svn: 161780
* [ms-inline asm] PatchMSAsmString() doesn't correctly patch non-simple asmChad Rosier2012-08-101-0/+9
| | | | | | | statements. Therefore, we can't pass the PatchedAsmString to the AsmParser and expect things to work. llvm-svn: 161701
* [ms-inline asm] Fix a memory leak introduced in r161686.Chad Rosier2012-08-101-1/+1
| | | | llvm-svn: 161698
* [ms-inline asm] Add clobbers to AST representation.Chad Rosier2012-08-101-2/+3
| | | | llvm-svn: 161686
* [ms-inline asm] Use asserts as these calls are now guarded by identical checks.Chad Rosier2012-08-101-9/+5
| | | | llvm-svn: 161676
* Whitespace.Chad Rosier2012-08-101-31/+31
| | | | llvm-svn: 161673
* [ms-inline asm] Fix comment.Chad Rosier2012-08-091-1/+1
| | | | llvm-svn: 161622
* [ms-inline asm] Use StringRef here, per Jordan's suggestion.Chad Rosier2012-08-091-1/+1
| | | | llvm-svn: 161619
* [ms-inline asm] Simplify logic for empty asm statements.Chad Rosier2012-08-091-0/+10
| | | | llvm-svn: 161615
* [ms-inline asm] Instantiate the various parts to the AsmParser.Chad Rosier2012-08-091-4/+40
| | | | llvm-svn: 161614
* [ms-inline asm] Initialize targets and assembly printers/parsers.Chad Rosier2012-08-091-0/+6
| | | | llvm-svn: 161595
* [ms-inline asm] Use more idiomatic logic. Thanks, Bill.Chad Rosier2012-08-081-2/+2
| | | | llvm-svn: 161526
* [ms-inline asm] Make sure IsSimple is correctly handled.Chad Rosier2012-08-081-3/+3
| | | | llvm-svn: 161522
* Remove extraneous comment.Chad Rosier2012-08-081-1/+0
| | | | llvm-svn: 161521
OpenPOWER on IntegriCloud