summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Use the most recent redecl to decide if it is needed.Rafael Espindola2012-12-262-1/+18
| | | | | | This fixes pr14691, which I think is a regression from r168519. llvm-svn: 171077
* Produce an actual error before attempting to attach notes to it when bailing outRichard Smith2012-12-253-2/+9
| | | | | | due to FORCE_CLANG_DIAGNOSTICS_CRASH=1. Also add a test for that env var. llvm-svn: 171074
* Fix for PR12222.Erik Verbruggen2012-12-2511-415/+469
| | | | | | | | Changed getLocStart() and getLocEnd() to be required for Stmts, and make getSourceRange() optional. The default implementation for getSourceRange() is build the range by calling getLocStart() and getLocEnd(). llvm-svn: 171067
* Add intel_ocl_bicc calling convention as a function attribute to clang. The ↵Guy Benyei2012-12-2514-4/+43
| | | | | | calling convention is already implemented in LLVM. llvm-svn: 171056
* Add 171048 back but invalidate the cache of all redeclarations when settingRafael Espindola2012-12-259-48/+90
| | | | | | | | | | | | | | | | | | the body of a functions. The problem was that hasBody looks at the entire chain and causes problems to -fvisibility-inlines-hidden if the cache was not invalidated. Original message: Cache visibility of decls. This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. llvm-svn: 171053
* Revert r171048, "Cache visibility of decls."NAKAMURA Takumi2012-12-258-76/+48
| | | | | | It broke stage2. llvm-svn: 171050
* Cache visibility of decls.Rafael Espindola2012-12-258-48/+76
| | | | | | | | | | | This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. llvm-svn: 171048
* Simplify RUN lines. No functionality change.Nick Lewycky2012-12-241-2/+2
| | | | llvm-svn: 171045
* Let clang-format format itself.Daniel Jasper2012-12-244-25/+23
| | | | | | | | Apply all formatting changes that clang-format would apply to its own source code. All choices seem to improve readability (or at least not make it worse). No functional changes. llvm-svn: 171039
* Penalize tokens with a lower parenthesis level than the start of the line.Daniel Jasper2012-12-242-3/+25
| | | | | | | | | | | | | | | | This prevents formattings like this (assuming "parameter" doesn't fit the line): bool f = someFunction() && someFunctionWithParam( parameter) && someOtherFunction(); Here, "parameter" - the start of line 2 - has a parenthesis level of 2, but there are subsequent tokens ("&&" and "someOtherFunction") with a lower level. This is bad for readability as "parameter" hides "someOtherFunction". With this patch, this changes to: bool f = someFunction() && someFunctionWithParam(parameter) && someOtherFunction(); llvm-svn: 171038
* Align RHS after assignments and return statements.Daniel Jasper2012-12-242-9/+46
| | | | | | | | | | | | | | | | This changes: int Result = a + // force break b; return Result + // force break 5; To: int Result = a + // force break b; return Result + // force break 5; llvm-svn: 171032
* Fix formatting over overloaded operators.Daniel Jasper2012-12-242-3/+35
| | | | | | | | | | | | | | | | | | | This fixes llvm.org/pr14686. We used to add too many spaces for different versions of overloaded operator function declarations/definitions. This patch changes, e.g. operator *() {} operator >() {} operator () () {} to operator*() {} operator>() {} operator()() {} llvm-svn: 171028
* Support -fsanitize-memory-track-origins.Evgeniy Stepanov2012-12-247-5/+38
| | | | llvm-svn: 171020
* CGClass.cpp: [PR14335] Remove comma-separated \param, for now. [-Wdocumentation]NAKAMURA Takumi2012-12-241-4/+0
| | | | | | /// \param argBegin,argEnd the arguments to evaluate and pass to the constructor llvm-svn: 171015
* clang/AST/VTTBuilder.h: Prune one description in three methods, ↵NAKAMURA Takumi2012-12-241-9/+0
| | | | | | | | VTTBuilder::AddVTablePointer(), VTTBuilder::LayoutSecondaryVirtualPointers(), and VTTBuilder::LayoutSecondaryVirtualPointers(). [-Wdocumentation] /// \param AddressPoints - If the vtable is a construction vtable, this has the address points for it. llvm-svn: 171014
* CGDecl.cpp: Prune three descriptions in two methods, ↵NAKAMURA Takumi2012-12-241-8/+0
| | | | | | | | | | CodeGenFunction::pushIrregularPartialArrayCleanup() and CodeGenFunction::pushRegularPartialArrayCleanup(). [-Wdocumentation] /// \param array - a value of type elementType* /// \param destructionKind - the kind of destruction required /// \param initializedElementCount - a value of type size_t* holding the number of successfully-constructed elements llvm-svn: 171013
* DiagnosticRenderer.cpp: Prune one description in ↵NAKAMURA Takumi2012-12-241-1/+0
| | | | | | | | DiagnosticRenderer::emitMacroExpansions(). [-Wdocumentation] /// \param MacroSkipEnd The depth to stop skipping macro expansions. llvm-svn: 171012
* CGValue.h: Update one \param to Addr in MakeBitfield(). [-Wdocumentation]NAKAMURA Takumi2012-12-241-1/+1
| | | | llvm-svn: 171011
* test/Index/preamble_macro_template.cpp: Tweak for win32.NAKAMURA Takumi2012-12-241-3/+1
| | | | | | | | | | | Using the file immediately after "> file 2>&1" causes weird behavior on win32. For example, "foo > %t 2>&1; FileCheck --input-file=%t" Use "foo 2>&1 | tee %t" instead. Note, mixing stdout and stderr to the same handle might cause unexpected behavior, due to buffering. llvm-svn: 171009
* Take operator precedence into account when splitting lines.Daniel Jasper2012-12-242-3/+22
| | | | | | | | | | | | | | | With this patch, splitting after binary operators has a panelty corresponding to the operator's precedence. We used to ignore this and eagerly format like: if (aaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbbbbbbb && ccccccccccccccccccccccccc) { .. } With this patch, this becomes: if (aaaaaaaaaaaaaaaaaaaaaaaaa || bbbbbbbbbbbbbbbbbbbbbbbbb && ccccccccccccccccccccccccc) { .. } llvm-svn: 171007
* Documentation: PTHInternals: use correct adornments and fix typosDmitri Gribenko2012-12-231-4/+4
| | | | | | Fixes PR14014 llvm-svn: 171005
* Documentation: fix a syntax error: empty line required after code-block::Dmitri Gribenko2012-12-231-0/+1
| | | | llvm-svn: 171004
* Documentation: add MemorySanitizer to the toctreeDmitri Gribenko2012-12-231-1/+2
| | | | llvm-svn: 171003
* docs: Convert ReleaseNotes to reST.Sean Silva2012-12-233-181/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the last of the "regular" documents to convert to reST, and so I'm declaring the initial clang reST conversion "done". However, - There are some documents in clang/www/ which probably should be migrated into clang/docs/, such as www/OpenProjects.html The primary thing blocking me from doing this right now is not knowing how to set up a redirect so that the old URL's continue to work. - LibASTMatchersReference.html is not reST. This page is auto-generated by clang/docs/tools/dump_ast_matchers.py from the source and has some collapse/expand logic that isn't expressible directly with Sphinx, so just converting it to reST is not really a good strategy. Manuel Klimek and I discussed this and the general agreed-upon direction is making that page data-driven so that it, say, pulls in an auto-generated blob of JSON which describes the matchers and builds up the "matcher reference" part of the page with a small amount of JS. - There are some rogue .txt files hanging around. Also, I dropped the little dragon logo at the top because Sphinx was warning about an external image reference (not sure why, but meh, I didn't want to fight it). If anything, we would want such a logo integrated into the site's overall theme, rather than hardcoded here. llvm-svn: 170994
* libFormat: Teach the *& usage heuristic that "return" starts a rhs too.Nico Weber2012-12-232-5/+11
| | | | | | | | "return a*b;" was formatted as "return a *b;" and is now formatted as "return a * b;". Fixes PR14687 partially. llvm-svn: 170993
* Move a declaration closer to its use. No functionality change.Nico Weber2012-12-231-2/+2
| | | | llvm-svn: 170992
* Clean out release notes for clang 3.3Benjamin Kramer2012-12-221-174/+13
| | | | llvm-svn: 170987
* [libclang] Fix crash when code-completing a macro invocation thatArgyrios Kyrtzidis2012-12-223-15/+55
| | | | | | reached EOF and did not expand the argument into the source context. llvm-svn: 170980
* [libclang] Don't try to translate diagnostics from the precompiled preamble ↵Argyrios Kyrtzidis2012-12-222-35/+0
| | | | | | | | | | | to the code-completion results, the SourceManager state may be slightly different when code-completing. And we don't even care for diagnostics when code-completing, anyway. llvm-svn: 170979
* [libclang] Check for the 'LIBCLANG_NOTHREADS' environment variable before ↵Argyrios Kyrtzidis2012-12-221-0/+6
| | | | | | | | creating a separate thread for code-completion. llvm-svn: 170978
* PR14695: Fix assert from bad cast<>. Not every namespace is a NamespaceDecl; ↵Richard Smith2012-12-222-5/+21
| | | | | | it might instead be a TranslationUnitDecl. llvm-svn: 170976
* Add back -Wduplicate-enum which I mistakenly removed.Ted Kremenek2012-12-223-0/+275
| | | | | | | | | | | | This was removed with -Wunique-enum, which is still removed. The corresponding thread on cfe-comments for that warning is here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-September/024224.html If we get specific user feedback for -Wduplicate-enum we can evaluate whether or not to keep it. llvm-svn: 170974
* Fix typo: objc_no_direct_instance_variable_assignmemt => ↵Ted Kremenek2012-12-223-4/+4
| | | | | | | | objc_no_direct_instance_variable_assignment. Fixes <rdar://problem/12927551>. llvm-svn: 170971
* [analyzer] Convert SimpleStreamChecker to use the PointerEscape callbackAnna Zaks2012-12-221-80/+16
| | | | | | The new callback greatly simplifies the checker. llvm-svn: 170969
* Use a safe default width for template-diff'ing integral arguments, inDouglas Gregor2012-12-212-1/+19
| | | | | | | case we can't find an exact width to use. Fixes crash in <rdar://problem/12456626>. llvm-svn: 170951
* Adding to FormatTest.cpp test for a very long ObjC methodFariborz Jahanian2012-12-211-0/+15
| | | | | | declaration requiring formatting of wrap-arounds. llvm-svn: 170946
* Tweak Sema::CheckLiteralKind() to also include block literalsTed Kremenek2012-12-214-12/+11
| | | | | | | This simplifies some diagnostic logic in checkUnsafeAssignLiteral(), hopefully making it less error prone. llvm-svn: 170945
* Insulate this test from the whims of the random number generator.Matt Beaumont-Gay2012-12-211-2/+2
| | | | | | | Our internal buildbot just failed because the tempfile happened to be named 'nodefaultlib-lcGA7k.o', which contains the substring '-lc'. llvm-svn: 170941
* Add comments back that were accidentally removed in r170933.Chad Rosier2012-12-211-0/+2
| | | | llvm-svn: 170938
* Fix a warning due to an extraneous comma.Chad Rosier2012-12-211-1/+1
| | | | llvm-svn: 170935
* Remove unused arguments and rename to conform to coding standards.Chad Rosier2012-12-213-18/+10
| | | | llvm-svn: 170933
* Change checkUnsafeAssignLiteral() to use the new Sema::CheckLiteralKind().Ted Kremenek2012-12-214-28/+23
| | | | | | | | | | Along the way, fix a bug in CheckLiteralKind(), previously in diagnoseObjCLiteralComparison, where we didn't ignore parentheses in boxed expressions for purpose of classification. In other words, both @42 and @(42) should be classified as numeric literals. llvm-svn: 170931
* Hoist logic for classifying Objective-C literals into Sema (proper) for use ↵Ted Kremenek2012-12-212-52/+57
| | | | | | | | with other diagnostics. No immediate (intended) functionality change. llvm-svn: 170930
* Switch FrontendOptions to using an initializer list rather than initializingRichard Smith2012-12-211-14/+8
| | | | | | | the values in the constructor. The constructor implementation is trivial beyond the value initialisations. Patch by Saleem Abdulrasool! llvm-svn: 170929
* Fixes couple of friend declaration -ast-print bugFariborz Jahanian2012-12-212-6/+29
| | | | | | | | | found by running -ast-print on all-std-headers.cpp which caused it to go into infinite loop. Now -ast-print prints all declarations found in all-std-headers.cpp. llvm-svn: 170928
* Indent.Chad Rosier2012-12-211-2/+1
| | | | llvm-svn: 170925
* Remove unnecessary checks.Chad Rosier2012-12-211-6/+3
| | | | llvm-svn: 170924
* Use descriptive enum instead of raw integers for checkUnsafeAssignLiteral().Ted Kremenek2012-12-211-7/+9
| | | | llvm-svn: 170920
* Sink call to checkUnsafeAssignLiteral() into checkUnsafeAssignObject().Ted Kremenek2012-12-211-23/+22
| | | | llvm-svn: 170919
* Fix indent.Chad Rosier2012-12-211-1/+1
| | | | llvm-svn: 170918
OpenPOWER on IntegriCloud