summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [mips] clz is defined to give 32 for zero. Similarly, dclz gives 64.Daniel Sanders2014-07-092-0/+34
| | | | | | | | | | | | | | | Summary: While debugging another issue, I noticed that Mips currently specifies that the count leading zero builtins are undefined when the input is zero. The architecture specifications say that the clz and dclz instructions write 32 or 64 respectively when given zero. This doesn't fix any bugs that I'm aware of but it may improve optimisation in some cases. Differential Revision: http://reviews.llvm.org/D4431 llvm-svn: 212618
* clang-format: Fix behavior around pointer-to-member invocations.Daniel Jasper2014-07-093-4/+8
| | | | | | | | | | | | Before: (aaaaaaaaaa->* bbbbbbb)(aaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaa)); After: (aaaaaaaaaa->*bbbbbbb)( aaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaa)); llvm-svn: 212617
* Fixed incompatibility with MSVC builds in range-based for loops in ↵Alexey Bataev2014-07-092-4/+8
| | | | | | DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP constructs. llvm-svn: 212601
* Revert commit 212599.Alexey Bataev2014-07-092-4/+2
| | | | llvm-svn: 212600
* [OPENMP] Fixed incompatibility in ↵Alexey Bataev2014-07-092-2/+4
| | | | | | [Data]RecursiveASTVisitor::TraverseOMPExecutableDirective method with MSVC for range-based loops. llvm-svn: 212599
* ARM: use LLVM's atomicrmw instructions when ldrex/strex are available.Tim Northover2014-07-094-17/+118
| | | | | | | | | | | | | | Having some kind of weird kernel-assisted ABI for these when the native instructions are available appears to be (and should be) the exception; OSs have been gradually opting in for years and the code was getting silly. So let LLVM decide whether it's possible/profitable to inline them by default. Patch by Phoebe Buckheister. llvm-svn: 212598
* clang-format: Add new option to indent wrapped function declarations.Daniel Jasper2014-07-095-2/+35
| | | | | | | | | Though not completely identical, make former IndentFunctionDeclarationAfterType change this flag for backwards compatibility (it is somewhat close in meaning and better the err'ing on an unknown config flag). llvm-svn: 212597
* clang-format: Update flag documentation.Daniel Jasper2014-07-091-5/+1
| | | | llvm-svn: 212594
* [OPENMP] Improved code of DataRecursiveASTVisitor and RecursiveASTVisitor ↵Alexey Bataev2014-07-092-126/+92
| | | | | | for OpenMP constructs per Tobias Grosser comments. llvm-svn: 212592
* clang-format: Revamp function declaration/definition indentation.Daniel Jasper2014-07-097-53/+86
| | | | | | | | | | | | | | Key changes: - Correctly (well ...) distinguish function declarations and variable declarations with ()-initialization. - Don't indent when breaking function declarations/definitions after the return type. - Indent variable declarations and typedefs when breaking after the type. This fixes llvm.org/PR17999. llvm-svn: 212591
* Fix typos.Nikola Smiljanic2014-07-092-2/+2
| | | | llvm-svn: 212589
* clang-interpreter: don't check input file existence, we're in-processAlp Toker2014-07-091-0/+1
| | | | | | | | | | | | This flag is set by most other tools and avoids extra stat() calls. The frontend will diagnose anyway as it performs the check atomically while opening files at point of use. We could probably make Driver::CheckInputsExist default to false and only enable it in the main 'clang' binary, or even better only perform the checks if we know the tool is external but that needs more thought. llvm-svn: 212585
* Simplify warning flag value handling from r206826Alp Toker2014-07-092-14/+10
| | | | | | Also give the field it a more appropriate name and improve the docs. llvm-svn: 212584
* rewrap to 80 cols, no behavior changeNico Weber2014-07-082-6/+7
| | | | llvm-svn: 212578
* rewrap to 80 cols, no behavior changeNico Weber2014-07-081-2/+3
| | | | llvm-svn: 212574
* MS compat: Allow lookup of types from dependent bases in functionsReid Kleckner2014-07-082-14/+27
| | | | | | | | | | | | | | | | | | | | | | If we want to resolve the remaining FIXMEs here, we probably want to extend the main lookup mechanism to perform lookup into dependent bases, but we would have to tread lightly. Adding more name lookup has major impact on compile time. If we did extend the main mechanism, we would add a flag to LookupResult that allows us to find names from dependent base classes where the base is a specialization of a known template. The final LookupResult would still return LookupResult::NotFoundInCurrentInstantiation, but it would have a collection of Decls. If we find a real lookup result, we would clear the flag and the existing lookup results and begin accumulating only real lookup results. We would structure the lookup as a secondary lookup between normal lookup and typo correction for normal compilation, but for MSVC compatibility mode, we would always enable this extra lookup into dependent bases. llvm-svn: 212566
* Remove unnecessary check for NULLAlexey Samsonov2014-07-081-10/+7
| | | | llvm-svn: 212564
* test: merge arm-intrin into ms-intrin, fix invocationSaleem Abdulrasool2014-07-082-6/+5
| | | | | | | | This merges the two tests into one since there is no real reason to separate them. It also fixes the test invocation to specify -fms-compatibility without which we would end up without an Intrin.h header. llvm-svn: 212563
* Allow more lookup of types in dependent base classesReid Kleckner2014-07-082-1/+248
| | | | | | | | | | | | | | | | | | | | MSVC appears to perform name lookup into dependent base classes when the dependent base class has a known primary template. This allows them to know whether some unqualified ids are types or not, which allows them to parse more class templates without typename keywords. We can do the same thing when type name lookup fails, and if we find a single type decl in one of our dependent base classes, recover as though the user wrote 'typename MyClass::TypeFromBase'. This allows us to parse some COM smart pointer classes in wrl/client.h from the Windows 8 SDK. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D4237 llvm-svn: 212561
* Don't pull in setjmp.h in -ffreestanding compiles.Nico Weber2014-07-081-2/+7
| | | | | | | | Also provide _setjmpex(). r200243 put in _setjmp() and _setjmpex() behind a comment since jmp_buf wasn't available. r200344 added jmp_buf and put in _setjmp(), but missed _setjmpex(). llvm-svn: 212557
* Replace a few // comments with /**/ comments in headers, for consistency.Nico Weber2014-07-082-4/+4
| | | | llvm-svn: 212556
* Sema: Don't allow CVR qualifiers before structorsDavid Majnemer2014-07-085-27/+64
| | | | | | | | | We would silently accept volatile ~S() when the user probably intended to write virtual ~S(). This fixes PR20238. llvm-svn: 212555
* PR20227: materialize a temporary when dynamic_casting a class prvalue to aRichard Smith2014-07-082-1/+24
| | | | | | reference type. llvm-svn: 212551
* Update unit test for signature change.Benjamin Kramer2014-07-081-2/+3
| | | | llvm-svn: 212545
* Turn some Twine locals into const char * variables.Benjamin Kramer2014-07-081-4/+4
| | | | | | | No functionality change, just stylistic cleanup. Change made by clang-tidy and clang-format. llvm-svn: 212544
* Improve memory ownership of vfs::Files in the FileSystemStatCache by using ↵David Blaikie2014-07-086-24/+22
| | | | | | | | | std::unique_ptr Spotted after a memory leak (due to the complexities of manual memory management) was fixed in 212466. llvm-svn: 212541
* [OPENMP] Allow ‘reduction’ clause on ‘omp simd’ directive.Alexander Musman2014-07-083-1/+379
| | | | llvm-svn: 212525
* Move misplaced x86_32 ABI codeRichard Sandiford2014-07-081-38/+38
| | | | | | | | | | r184166 added an X86_32 function in the middle of the SystemZ code. The SystemZ port had been added only a couple of weeks earlier and the original patch probably predated that. No behavioral change intended. llvm-svn: 212524
* [OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.Alexey Bataev2014-07-0838-8/+2576
| | | | llvm-svn: 212516
* Headers: conditionalise more declarationsSaleem Abdulrasool2014-07-082-0/+8
| | | | | | | | Protect MMX specific declarations under a __MMX__ guard. This header can be included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA. Use the preprocessor to prevent these declarations from being processed. llvm-svn: 212512
* Headers: mark arm_acle.h with extern "C"Saleem Abdulrasool2014-07-081-0/+8
| | | | | | | | | Although the functions are marked as always_inline, the compiler with which they are used may not honour the extended attributes and emit them as functions. In such a case, indicate that they should have extern "C" linkage and should not be mangled in C++ style if used within C++. llvm-svn: 212511
* MS ABI: "Fix" passing non-POD structs by value to variadic functionsReid Kleckner2014-07-082-23/+53
| | | | | | | | | | Of course, such code is horribly broken and will explode on impact. That said, ATL does it, and we have to support them, at least a little bit. Fixes PR20191. llvm-svn: 212508
* [ASan] Completely remove sanitizer blacklist file from instrumentation pass.Alexey Samsonov2014-07-081-4/+1
| | | | | | | | | | | | | | | | | | | | All blacklisting logic is now moved to the frontend (Clang). If a function (or source file it is in) is blacklisted, it doesn't get sanitize_address attribute and is therefore not instrumented. If a global variable (or source file it is in) is blacklisted, it is reported to be blacklisted by the entry in llvm.asan.globals metadata, and is not modified by the instrumentation. The latter may lead to certain false positives - not all the globals created by Clang are described in llvm.asan.globals metadata (e.g, RTTI descriptors are not), so we may start reporting errors on them even if "module" they appear in is blacklisted. We assume it's fine to take such risk: 1) errors on these globals are rare and usually indicate wild memory access 2) we can lazily add descriptors for these globals into llvm.asan.globals lazily. llvm-svn: 212505
* Rename static function to better describe its purposeAlp Toker2014-07-081-4/+4
| | | | llvm-svn: 212502
* [Sanitizer] Remove brittle cache variable and slightly simplify blacklisting ↵Alexey Samsonov2014-07-075-21/+15
| | | | | | | | | | | | code. Now CodeGenFunction is responsible for looking at sanitizer blacklist (in CodeGenFunction::StartFunction) and turning off instrumentation, if necessary. No functionality change. llvm-svn: 212501
* [Sanitizer] Reduce the usage of sanitizer blacklist in CodeGenModuleAlexey Samsonov2014-07-074-19/+28
| | | | | | | | | | | | | | | | Get rid of cached CodeGenModule::SanOpts, which was used to turn off sanitizer codegen options if current LLVM Module is blacklisted, and use plain LangOpts.Sanitize instead. 1) Some codegen decisions (turning TBAA or writable strings on/off) shouldn't depend on the contents of blacklist. 2) llvm.asan.globals should *always* be created, even if the module is blacklisted - soon Clang's CodeGen where we read sanitizer blacklist files, so we should properly report which globals are blacklisted to the backend. llvm-svn: 212499
* libclang: pass return code out argument by referenceAlp Toker2014-07-072-19/+16
| | | | | | | | r212427 formalized the message-passing pattern by making these argument structures const. This commit changes output arguments to get passed by reference so we can eliminate mutable fields. llvm-svn: 212497
* ASTContext: Factor 'getObjCEncodingForPropertyType' as its own method.Joe Groff2014-07-072-3/+15
| | | | | | | It is useful to get the property encoding for an ObjC type without a full ObjCPropertyDecl. llvm-svn: 212496
* PlistSupport: make utility functions non-static inline to encourage linker dedupAlp Toker2014-07-071-15/+15
| | | | llvm-svn: 212494
* Driver: Produce crash diagnostics more often on WindowsReid Kleckner2014-07-071-2/+7
| | | | | | | | | | | | | Assertion failures call abort(), which return an exit code of 3 on Windows. The 'not' utility has the same check. Unfortunately, the crash-report.c test requires a shell, so it does not run for me locally, so I can only test this manually. There's still more work to be done here: we should generate a batch script instead of a shell script on Windows. llvm-svn: 212481
* Driver: Fix think-o in adding -ivfsoverlay flag to crashdumpsJustin Bogner2014-07-071-3/+5
| | | | | | | If there isn't a VFS to overlay we shouldn't be adding a -ivfsoverlay flag. llvm-svn: 212468
* Use temporary module cache in testBen Langmuir2014-07-071-1/+3
| | | | llvm-svn: 212467
* Fix memory leak in FileSystemStatCache.Manuel Klimek2014-07-071-0/+1
| | | | | | Patch by Guochun Shi. llvm-svn: 212466
* Handle __builtin_clzs and __builtin_ctzs in the constant expression evaluator.Anders Carlsson2014-07-072-45/+51
| | | | llvm-svn: 212464
* MS ABI: Don't unnecessarily use CGM abstractionDavid Majnemer2014-07-071-1/+1
| | | | | | | If we are in MicrosoftCXXABI, we don't need to use CGM to get a TypeDescriptor. llvm-svn: 212463
* Fix comment typo.David Majnemer2014-07-071-5/+6
| | | | | | No functionality changed. llvm-svn: 212462
* PTHInternals.rst: PCH is now a thing, update docs to reflect itAlp Toker2014-07-071-5/+5
| | | | llvm-svn: 212458
* PTH: use a variable instead of a macroAlp Toker2014-07-071-8/+10
| | | | | | Cleanup only. llvm-svn: 212457
* [OPENMP] Added initial support for 'omp parallel for'.Alexey Bataev2014-07-0745-60/+3061
| | | | llvm-svn: 212453
* Increase argument limit of anyOf, allOf and eachOf from 5 to 9.Manuel Klimek2014-07-071-4/+58
| | | | | | Patch by Alexey Sokolov. llvm-svn: 212452
OpenPOWER on IntegriCloud