summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* fix a missing check in my last patch.Fariborz Jahanian2013-03-052-3/+12
| | | | | | // rdar://13094352 llvm-svn: 176529
* Preprocessor: don't consider // to be a line comment in -E -std=c89 mode.Jordan Rose2013-03-053-4/+16
| | | | | | | | | | | | | | | | | | | It's beneficial when compiling to treat // as the start of a line comment even in -std=c89 mode, since it's not valid C code (with a few rare exceptions) and is usually intended as such. We emit a pedantic warning and then continue on as if line comments were enabled. This has been our behavior for quite some time. However, people use the preprocessor for things besides C source files. In today's prompting example, the input contains (unquoted) URLs, which contain // but should still be preserved. This change instructs the lexer to treat // as a plain token if Clang is in C90 mode and generating preprocessed output rather than actually compiling. <rdar://problem/13338743> llvm-svn: 176526
* doc. parsing. Improve on diagnostics on my last patch.Fariborz Jahanian2013-03-055-13/+36
| | | | | | // rdar://13094352. llvm-svn: 176525
* Remove outdated claim that GCC builds without a C++ compiler from compilers ↵Richard Smith2013-03-051-1/+0
| | | | | | comparison. llvm-svn: 176515
* Use ASTContext::getDeclAlign(<Field Decl>) to get the alignment of the firstLang Hames2013-03-052-3/+21
| | | | | | | | | | field to be memcpy'd, rather instead of ASTContext::getTypeAlign(<Field Type>). For packed structs the alignment of a field may be less than the alignment of the field's type. <rdar://problem/13338585> llvm-svn: 176512
* [libclang] When logging a CXTranslationUnit that came from an AST file, ↵Argyrios Kyrtzidis2013-03-053-0/+14
| | | | | | print out the filename. llvm-svn: 176511
* Fix this checkin.Fariborz Jahanian2013-03-051-1/+1
| | | | llvm-svn: 176510
* doc parsing. Add @method and @callback forFariborz Jahanian2013-03-057-19/+46
| | | | | | | checkings and few other refactoring/cleanup. // rdar://13094352. llvm-svn: 176509
* Mips specific inline assembler constraint 'R'Jack Carter2013-03-052-1/+27
| | | | | | | | | | | | 'R' An address that can be sued in a non-macro load or store. Including missing positive test case and fixed typo for r176453. Thanks to Richard Smith for catching this! Jack llvm-svn: 176506
* Make LibASTMatchersTutorial code match textEdwin Vane2013-03-051-5/+5
| | | | | | | Fixed code to match text. Slight adjustment for readability. Author: Béatrice Creusillet llvm-svn: 176493
* Documentation: use code highlightingDmitri Gribenko2013-03-051-30/+31
| | | | llvm-svn: 176480
* Add a test that we are passing the -fobjc-default-synthesize flag for Apple andDavid Chisnall2013-03-051-0/+6
| | | | | | non-Apple platforms. llvm-svn: 176477
* Don't emit calls to virtual [[noreturn]] functions as noreturn; overrides of aRichard Smith2013-03-052-2/+18
| | | | | | | | [[noreturn]] function are not required to also be [[noreturn]]. We still emit calls to virtual __attribute__((noreturn)) functions as noreturn; unlike GCC, we do require overriders to also be noreturn for that attribute. llvm-svn: 176476
* Add quotation marks to template names in diagnostics.David Blaikie2013-03-059-11/+31
| | | | llvm-svn: 176474
* scan-build: explicitly say "No bugs found" if there are no reports.Jordan Rose2013-03-051-0/+1
| | | | | | Patch by Martin Storsjo! llvm-svn: 176472
* Silence a number of static analyzer warnings with assertions and such.Jordan Rose2013-03-059-7/+17
| | | | | | No functionality change. llvm-svn: 176469
* doc parsing. We want to issue a strong warning whenFariborz Jahanian2013-03-058-2/+40
| | | | | | | an @function comment is not followed by a function decl. // rdar://13094352 llvm-svn: 176468
* [analyzer] Don't let cf_audited_transfer override CFRetain semantics.Jordan Rose2013-03-042-6/+39
| | | | | | | | | | We weren't treating a cf_audited_transfer CFRetain as returning +1 because its name doesn't contain "Create" or "Copy". Oops! Fortunately, the standard definitions of these functions are not marked audited. <rdar://problem/13339601> llvm-svn: 176463
* Comment parsing: refactor handling of command markers in ASTDmitri Gribenko2013-03-047-69/+154
| | | | | | | | | | | | | | | * Use the term 'command marker', because the semantics of 'backslash' and 'at' commands are the same. (Talking about 'at commands' makes them look like a special entity.) * Sink the flag down into bitfields, reducing the size of AST nodes. * Change the flag into an enum for clarity. Boolean function parameters are not very clear. * Add unittests for new tok::at_command tokens. llvm-svn: 176461
* Add ARM v6m, v7m, and v7em architectures for Cortex-M series processors.Bob Wilson2013-03-044-14/+35
| | | | | | <rdar://problem/11314476> llvm-svn: 176458
* Tidy up lists of Cortex-A series processors, adding entries for A7.Bob Wilson2013-03-043-6/+11
| | | | | | Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM. llvm-svn: 176457
* Fix confused use of llvm::StringSwitch for armv7r architecture.Bob Wilson2013-03-041-1/+1
| | | | | | | | | svn 170909 added support for cortex-r5 but in this case it was done incorrectly. The last argument to StringSwitch.Cases() is the replacement value, so by adding "cortex-r5" it changed the default cpu for armv7r to cortex-r5 instead of cortex-r4. llvm-svn: 176456
* Mips specific inline assembler constraint 'R'Jack Carter2013-03-042-3/+4
| | | | | | | 'R' An address that can be sued in a non-macro load or store. This patch includes a positive test case. llvm-svn: 176453
* [PCH] In HeaderFileInfoTrait::EqualKey(), use FileManager::getFile() to ↵Argyrios Kyrtzidis2013-03-042-5/+5
| | | | | | | | | compare two filenames, instead of llvm::sys::fs::equivalent(). llvm::sys::fs::equivalent() does 2 stat calls every time it's called. Use FileManager::getFile() to take advantage of the stat caching that FileManager is providing. llvm-svn: 176450
* Comment parsing tests: move a test into a group of similar testsDmitri Gribenko2013-03-041-4/+6
| | | | llvm-svn: 176449
* [comment parsing] source fidelity for tparam command too.Fariborz Jahanian2013-03-043-2/+7
| | | | | | // rdar://13066276 llvm-svn: 176448
* Make sure to not split string literals at the first character.Manuel Klimek2013-03-042-2/+10
| | | | llvm-svn: 176447
* warn-documentation.cpp: reorganize testsDmitri Gribenko2013-03-041-28/+18
| | | | | | Tests are ordered by command in this file. It is nice to keep it that way. llvm-svn: 176445
* comment parsing. Missed a case of referringFariborz Jahanian2013-03-043-1/+10
| | | | | | to original command in diagnostic. // rdar://13066276 llvm-svn: 176444
* hasQualifer() matcher should return false if there's no qualifierEdwin Vane2013-03-043-3/+10
| | | | | | | | Instead of passing NULL on to sub-matcher, just return false. Updated tests and regenerated docs. Author: Tareq A Siraj <tareq.a.siraj@intel.com> llvm-svn: 176441
* R600: Use the GPU type to determine the correct DataLayout v2Tom Stellard2013-03-041-8/+101
| | | | | | | | | v2: - Add R600_DOUBLE_OPS for RV670 - s/CPU/GPU/ Reviewed-by: Alex Deucher <alexander.deucher@amd.com> llvm-svn: 176440
* Format a line if a range in its leading whitespace was selected.Daniel Jasper2013-03-043-3/+33
| | | | | | | | | | | With [] marking the selected range, clang-format invoked on [ ] int a; Would so far not reformat anything. With this patch, it formats a line if its leading whitespace is touched. llvm-svn: 176435
* Make the tutorial easier to compile by adding in some of the details.Manuel Klimek2013-03-041-0/+5
| | | | | | Patch by Béatrice Creusillet. llvm-svn: 176434
* Correction to r176432: the bug actually fixed was <rdar://13025708>.John McCall2013-03-041-1/+1
| | | | llvm-svn: 176433
* Centralize and refine the __unknown_anytype argument rulesJohn McCall2013-03-044-31/+62
| | | | | | | | | and be sure to apply them whether or not the debugger gave us a method declaration. rdar://12565338 llvm-svn: 176432
* Fix the emission of the copy-initialization of a block captureJohn McCall2013-03-042-2/+40
| | | | | | | | from a lambda capture when the capture is not trivially-copyable. rdar://13295759 llvm-svn: 176431
* Check for warnings in a bunch of the linker invocations, and add oneChandler Carruth2013-03-042-2/+13
| | | | | | | | | | | with both -static-libgcc and -static on the commandline. Fix a warning in the latter case due to a backwards short circuiting || operator in the driver. No real functionality changed here, just allows the driver to properly consume -static-libgcc when -static is also specified. llvm-svn: 176429
* Perform non-overload placeholder conversions on the operandsJohn McCall2013-03-043-16/+99
| | | | | | | | to a subscript operator. rdar://13332183 llvm-svn: 176428
* Beef up the testing of our 'ld' invocation on linux to cover staticChandler Carruth2013-03-042-0/+43
| | | | | | linking. About to fix a bug here and there was no good test case. llvm-svn: 176427
* Add an idea for a cpp11-migrate tool: TR1 migrationDmitri Gribenko2013-03-031-0/+25
| | | | | | Idea by Marshall Clow. llvm-svn: 176423
* Remove unused check from test.David Chisnall2013-03-031-2/+0
| | | | llvm-svn: 176422
* [docs] SpellingSean Silva2013-03-031-1/+1
| | | | llvm-svn: 176421
* Improve C11 atomics support:David Chisnall2013-03-033-12/+228
| | | | | | | | | | | | | | | | | | | | - Generate atomicrmw operations in most of the cases when it's sensible to do so. - Don't crash in several common cases (and hopefully don't crash in more of them). - Add some better tests. We now generate significantly better code for things like: _Atomic(int) x; ... x++; On MIPS, this now generates a 4-instruction ll/sc loop, where previously it generated about 30 instructions in two nested loops. On x86-64, we generate a single lock incl, instead of a lock cmpxchgl loop (one instruction instead of ten). llvm-svn: 176420
* Default to enabling default-synthesized ivars on all platformsDavid Chisnall2013-03-032-9/+1
| | | | llvm-svn: 176419
* [docs] Use vim code-block instead of console.Sean Silva2013-03-031-1/+1
| | | | llvm-svn: 176418
* Process #pragma weak only after we know the linkage of the function or variableRafael Espindola2013-03-024-24/+35
| | | | | | we are looking at. llvm-svn: 176414
* CommandLineArgumentParser: handle single quotes.Peter Collingbourne2013-03-022-3/+20
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D482 llvm-svn: 176404
* [analyzer] Simple inline defensive checks suppressionAnna Zaks2013-03-027-870/+530
| | | | | | | | | | | | | | | | | | | | | Inlining brought a few "null pointer use" false positives, which occur because the callee defensively checks if a pointer is NULL, whereas the caller knows that the pointer cannot be NULL in the context of the given call. This is a first attempt to silence these warnings by tracking the symbolic value along the execution path in the BugReporter. The new visitor finds the node in which the symbol was first constrained to NULL. If the node belongs to a function on the active stack, the warning is reported, otherwise, it is suppressed. There are several areas for follow up work, for example: - How do we differentiate the cases where the first check is followed by another one, which does happen on the active stack? Also, this only silences a fraction of null pointer use warnings. For example, it does not do anything for the cases where NULL was assigned inside a callee. llvm-svn: 176402
* Some refactoring in my patch on documentFariborz Jahanian2013-03-029-67/+72
| | | | | | command source fidelity. // rdar://13066276 llvm-svn: 176401
* LLVM API changes.Peter Collingbourne2013-03-021-2/+1
| | | | llvm-svn: 176398
OpenPOWER on IntegriCloud