summaryrefslogtreecommitdiffstats
path: root/clang/docs/UsersManual.rst
Commit message (Collapse)AuthorAgeFilesLines
...
* Support generating NMake/Jom-style depfiles.Paul Robinson2015-04-271-0/+19
| | | | | | | | | | | | | | | NMake is a Make-like builder that comes with Microsoft Visual Studio. Jom (https://wiki.qt.io/Jom) is an NMake-compatible build tool. Dependency files for NMake/Jom need to use double-quotes to wrap filespecs containing special characters, instead of the backslash escapes that GNU Make wants. Adds the -MV option, which specifies to use double-quotes as needed instead of backslash escapes when writing the dependency file. Differential Revision: http://reviews.llvm.org/D9260 llvm-svn: 235903
* Implement CFI type checks for non-virtual calls.Peter Collingbourne2015-04-021-1/+3
| | | | | | | | | | | | This uses the same class metadata currently used for virtual call and cast checks. The new flag is -fsanitize=cfi-nvcall. For consistency, the -fsanitize=cfi-vptr flag has been renamed -fsanitize=cfi-vcall. Differential Revision: http://reviews.llvm.org/D8756 llvm-svn: 233874
* [UBSan] Don't allow to use UBSan with anything except for ASan.Alexey Samsonov2015-03-201-2/+2
| | | | | | | | | | We are not able to make a reliable solution for using UBSan together with other sanitizers with runtime support (and sanitizer_common). Instead, we want to follow the path used for LSan: have a "standalone" UBSan tool, and plug-in UBSan that would be explicitly embedded into specific sanitizers (in short term, it will be only ASan). llvm-svn: 232829
* Implement bad cast checks using control flow integrity information.Peter Collingbourne2015-03-141-0/+6
| | | | | | | | | | | This scheme checks that pointer and lvalue casts are made to an object of the correct dynamic type; that is, the dynamic type of the object must be a derived class of the pointee type of the cast. The checks are currently only introduced where the class being casted to is a polymorphic class. Differential Revision: http://reviews.llvm.org/D8312 llvm-svn: 232241
* [UBSan] Split -fsanitize=shift into -fsanitize=shift-base and ↵Alexey Samsonov2015-03-091-1/+3
| | | | | | | | | | | | | | | | -fsanitize=shift-exponent. This is a recommit of r231150, reverted in r231409. Turns out that -fsanitize=shift-base check implementation only works if the shift exponent is valid, otherwise it contains undefined behavior itself. Make sure we check that exponent is valid before we proceed to check the base. Make sure that we actually report invalid values of base or exponent if -fsanitize=shift-base or -fsanitize=shift-exponent is specified, respectively. llvm-svn: 231711
* Revert "[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and ↵Alexey Samsonov2015-03-051-3/+1
| | | | | | | | | | | -fsanitize=shift-exponent." It's not that easy. If we're only checking -fsanitize=shift-base we still need to verify that exponent has sane value, otherwise UBSan-inserted checks for base will contain undefined behavior themselves. llvm-svn: 231409
* [UBSan] Split -fsanitize=shift into -fsanitize=shift-base and ↵Alexey Samsonov2015-03-031-1/+3
| | | | | | | | | | | | | | | | | | | | | -fsanitize=shift-exponent. -fsanitize=shift is now a group that includes both these checks, so exisiting users should not be affected. This change introduces two new UBSan kinds that sanitize only left-hand side and right-hand side of shift operation. In practice, invalid exponent value (negative or too large) tends to cause more portability problems, including inconsistencies between different compilers, crashes and inadequeate results on non-x86 architectures etc. That is, -fsanitize=shift-exponent failures should generally be addressed first. As a bonus, this change simplifies CodeGen implementation for emitting left shift (separate checks for base and exponent are now merged by the existing generic logic in EmitCheck()), and LLVM IR for these checks (the number of basic blocks is reduced). llvm-svn: 231150
* [msan] Change track-origins default mode from 1 to 2.Evgeniy Stepanov2015-02-261-4/+5
| | | | | | | | | | | Change -fsanitize-memory-track-origins to be equivalent to -fsanitize-memory-track-origins=2. Track-origins=2 provides a lot more detailed reports at the cost of some additional slowdown (ranging from none to, sometimes, 3x; ~3% average on SPEC2006). llvm-svn: 230644
* Implement Control Flow Integrity for virtual calls.Peter Collingbourne2015-02-201-0/+4
| | | | | | | | | | | | | | | This patch introduces the -fsanitize=cfi-vptr flag, which enables a control flow integrity scheme that checks that virtual calls take place using a vptr of the correct dynamic type. More details in the new docs/ControlFlowIntegrity.rst file. It also introduces the -fsanitize=cfi flag, which is currently a synonym for -fsanitize=cfi-vptr, but will eventually cover all CFI checks implemented in Clang. Differential Revision: http://reviews.llvm.org/D7424 llvm-svn: 230055
* Fix amount of diagnostic classesAlex Denisov2015-02-111-1/+1
| | | | llvm-svn: 228814
* Reimplement -fsanitize-recover family of flags.Alexey Samsonov2015-01-121-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Introduce the following -fsanitize-recover flags: - -fsanitize-recover=<list>: Enable recovery for selected checks or group of checks. It is forbidden to explicitly list unrecoverable sanitizers here (that is, "address", "unreachable", "return"). - -fno-sanitize-recover=<list>: Disable recovery for selected checks or group of checks. - -f(no-)?sanitize-recover is now a synonym for -f(no-)?sanitize-recover=undefined,integer and will soon be deprecated. These flags are parsed left to right, and mask of "recoverable" sanitizer is updated accordingly, much like what we do for -fsanitize= flags. -fsanitize= and -fsanitize-recover= flag families are independent. CodeGen change: If there is a single UBSan handler function, responsible for implementing multiple checks, which have different recoverable setting, then we emit two handler calls instead of one: the first one for the set of "unrecoverable" checks, another one - for set of "recoverable" checks. If all checks implemented by a handler have the same recoverability setting, then the generated code will be the same. llvm-svn: 225719
* Switch C compilations to C11 by default.Richard Smith2014-10-201-4/+12
| | | | | | | | This is long-since overdue, and matches GCC 5.0. This should also be backwards-compatible, because we already supported all of C11 as an extension in C99 mode. llvm-svn: 220244
* Change -Wbind-to-temporary-copy from an ExtWarn to an Extension.Nico Weber2014-09-181-1/+1
| | | | | | | | | | | | | | | | | The reasoning is that this construct is accepted by all compilers and valid in C++11, so it doesn't seem like a useful warning to have enabled by default. Building with -pedantic, -Wbind-to-temporary-copy, or -Wc++98-compat still shows the warning. The motivation is that I built re2, and this was the only warning that was emitted during the build. Both changing re2 to fix the warning and detecting clang and suppressing the warning in re2's build seem inferior than just giving the compiler a good default for this warning. Also move the cxx98compat version of this warning to CXX98CompatPedantic, and update tests accordingly. llvm-svn: 218008
* Implement nonnull-attribute sanitizerAlexey Samsonov2014-09-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements a new UBSan check, which verifies that function arguments declared to be nonnull with __attribute__((nonnull)) are actually nonnull in runtime. To implement this check, we pass FunctionDecl to CodeGenFunction::EmitCallArgs (where applicable) and if function declaration has nonnull attribute specified for a certain formal parameter, we compare the corresponding RValue to null as soon as it's calculated. Test Plan: regression test suite Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits, rnk Differential Revision: http://reviews.llvm.org/D5082 llvm-svn: 217389
* [UBSan] Add returns-nonnull sanitizer.Alexey Samsonov2014-08-131-0/+2
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds a runtime check verifying that functions annotated with "returns_nonnull" attribute do in fact return nonnull pointers. It is based on suggestion by Jakub Jelinek: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223693.html. Test Plan: regression test suite Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4849 llvm-svn: 215485
* Introduce f[no-]max-unknown-pointer-align=[number] optionFariborz Jahanian2014-08-051-0/+31
| | | | | | | | | to instruct the code generator to not enforce a higher alignment than the given number (of bytes) when accessing memory via an opaque pointer or reference. Patch reviewed by John McCall (with post-commit review pending). rdar://16254558 llvm-svn: 214911
* UsersManual: update clang-cl optionsHans Wennborg2014-08-041-49/+88
| | | | llvm-svn: 214777
* Enable -gcolumn-info by default.Diego Novillo2014-07-101-7/+2
| | | | | | | | | | | | | | | This patch flips the default value for -gcolumn-info to be on by default. I discussed the rationale and provided compile/size data in: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/074290.html This also updates the documentation and some tests that relied on the lack of column information. Some tests had column information in the expected output, but it was wrong (the tsan tests). Others were using the driver to execute. llvm-svn: 212781
* Add new debug kind LocTrackingOnly.Diego Novillo2014-06-241-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This new debug emission kind supports emitting line location information in all instructions, but stops code generation from emitting debug info to the final output. This mode is useful when the backend wants to track source locations during code generation, but it does not want to produce debug info. This is currently used by optimization remarks (-Rpass, -Rpass-missed and -Rpass-analysis). When one of the -Rpass flags is used, the front end will enable location tracking, only if no other debug option is enabled. To prevent debug information from being generated, a new debug info kind LocTrackingOnly causes DIBuilder::createCompileUnit() to not emit the llvm.dbg.cu annotation. This blocks final code generation from generating debug info in the back end. Depends on D4234. Reviewers: echristo, dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4235 llvm-svn: 211610
* Add documentation for PGO with instrumentation to clang's User's Manual.Bob Wilson2014-06-171-11/+78
| | | | | | <rdar://problem/16771671> llvm-svn: 211085
* Document Darwin-specific defaults.Adrian Prantl2014-06-131-2/+8
| | | | llvm-svn: 210958
* Make these two words equally bold.Adrian Prantl2014-06-131-1/+1
| | | | llvm-svn: 210938
* Copy the documentation of -fstandalone-debug from the man page to the userAdrian Prantl2014-06-131-0/+16
| | | | | | | | manual. rdar://problem/17307006 llvm-svn: 210936
* Remove top-level Clang -fsanitize= flags for optional ASan features.Alexey Samsonov2014-06-131-12/+0
| | | | | | | | | | | | | Init-order and use-after-return modes can currently be enabled by runtime flags. use-after-scope mode is not really working at the moment. The only problem I see is that users won't be able to disable extra instrumentation for init-order and use-after-scope by a top-level Clang flag. But this instrumentation was implicitly enabled for quite a while and we didn't hear from users hurt by it. llvm-svn: 210924
* Add documentation for -Rpass*Diego Novillo2014-05-291-0/+66
| | | | | | | | | | | | | | Summary: This adds documentation for -Rpass, -Rpass-missed and -Rpass-analysis. It also adds release notes for 3.5. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3730 llvm-svn: 209841
* Review feedback.Diego Novillo2014-04-231-2/+2
| | | | llvm-svn: 206997
* Review feedback.Diego Novillo2014-04-231-2/+11
| | | | llvm-svn: 206996
* Review feedbackDiego Novillo2014-04-231-15/+37
| | | | llvm-svn: 206995
* Add documentation for sample profiling support.Diego Novillo2014-04-231-0/+129
| | | | | | | | | | | | | | | Summary: This documents the usage of sample profilers with Clang and the profile format expected by LLVM's optimizers. It also documents the profile conversion tool used by Linux Perf. Reviewers: doug.gregor CC: cfe-commits Differential Revision: http://reviews.llvm.org/D3402 llvm-svn: 206994
* Move the -i[no-]system-prefix options from CC1Options.td to Options.td.Alexander Kornienko2014-03-261-5/+6
| | | | | | | | | | | | | | | | Summary: This allows them to be used without -cc1 the same way as -I and -isystem. Renamed the options to --system-header-prefix=/--no-system-header-prefix to avoid interference with -isystem and make the intent of the option cleaner. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3185 llvm-svn: 204775
* [msan] -fsanitize-memory-track-origins=[level] flag and docs.Evgeniy Stepanov2014-03-201-1/+6
| | | | | | | | | This change turns -fsanitize-memory-track-origins into -fsanitize-memory-track-origins=[level] flag (keeping the old one for compatibility). Possible levels are 0 (off), 1 (default) and 2 (incredibly detailed). See docs (part of this patch) for more info. llvm-svn: 204346
* Kill -faddress-sanitizer, -fthread-sanitizer and -fcatch-undefined-behavior ↵Alexey Samsonov2014-03-201-12/+0
| | | | | | | | | flags. These flags are deprecated since at least Clang 3.3. Users should instead use -fsanitize= with appropriate values. llvm-svn: 204330
* Add a note in the user manual that tsan is not supported on Mac.Nico Weber2014-03-071-1/+1
| | | | | | Patch from Sean McBride <sean@rogue-research.com>! llvm-svn: 203260
* "Mac OS/X" -> "Mac OS X" spelling fixes for clang.Nico Weber2014-03-071-3/+3
| | | | | | Patch from Sean McBride <sean@rogue-research.com>! llvm-svn: 203259
* Expand documentation section on comment parsingDmitri Gribenko2014-03-061-1/+26
| | | | | | Patch by Jonathan Sauer, with a little editing by me. llvm-svn: 203128
* Add 'remark' diagnostic type in 'clang'Tobias Grosser2014-02-281-5/+7
| | | | | | | | | | | | | | | | | | | | | | | A 'remark' is information that is not an error or a warning, but rather some additional information provided to the user. In contrast to a 'note' a 'remark' is an independent diagnostic, whereas a 'note' always depends on another diagnostic. A typical use case for remark nodes is information provided to the user, e.g. information provided by the vectorizer about loops that have been vectorized. This patch provides the initial implementation of 'remarks'. It includes the actual definiton of the remark nodes, their printing as well as basic parameter handling. We are reusing the existing diagnostic parameters which means a remark can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade remarks. This patch is by intention minimal in terms of parameter handling. More experience and more discussions will most likely lead to further enhancements in the parameter handling. llvm-svn: 202475
* [AArch64] Replace underscores with dashes in -mgeneral_regs_only.Amara Emerson2014-01-241-1/+1
| | | | | | This should now match the equivalent gcc option. llvm-svn: 200008
* [AArch64] Add -mgeneral_regs_only option.Amara Emerson2014-01-231-0/+7
| | | | llvm-svn: 199904
* Add documentation for -m16 option on X86, fix typoDavid Woodhouse2014-01-231-1/+8
| | | | llvm-svn: 199894
* Update user manual to note that implementation for C++11 and C++1y is ↵Richard Smith2013-12-121-11/+12
| | | | | | complete, and fix a bunch of other issues here. llvm-svn: 197120
* Remove old -fdiagnostics-show-name optionAlp Toker2013-12-091-5/+0
| | | | | | | | This had no effect since the feature was removed in r150612. I actually miss this option, maybe we can bring it back some day. llvm-svn: 196782
* Add a limit to the length of a sequence of 'operator->' functions we willRichard Smith2013-11-061-1/+6
| | | | | | | follow when building a class member access expression. Based on a patch by Rahul Jain! llvm-svn: 194161
* ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clangBernard Ogden2013-10-291-0/+9
| | | | | | | | Allow users to disable or enable CRC subtarget feature. Differential Revision: http://llvm-reviews.chandlerc.com/D2037 llvm-svn: 193600
* Document that -fsanitize=function is Linux-only.Peter Collingbourne2013-10-261-1/+1
| | | | llvm-svn: 193452
* Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware ↵Silviu Baranga2013-10-211-0/+11
| | | | | | divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior. llvm-svn: 193074
* Implement function type checker for the undefined behavior sanitizer.Peter Collingbourne2013-10-201-0/+2
| | | | | | | | | This uses function prefix data to store function type information at the function pointer. Differential Revision: http://llvm-reviews.chandlerc.com/D1338 llvm-svn: 193058
* clang-cl: Add support for asm listings (/FA and /Fa)Hans Wennborg2013-10-171-0/+2
| | | | | | | | | | This adds support for outputing the assembly to a file during compilation. It does this by changing the compilation pipeling to not use the integrated assembler, and keep the intermediate assembler file. Differential Revision: http://llvm-reviews.chandlerc.com/D1946 llvm-svn: 192902
* Add a section about clang-cl to UsersManual.rstHans Wennborg2013-10-101-0/+108
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1881 llvm-svn: 192337
* Update -fmsc-version docs for r190908, which set the default to 1700Reid Kleckner2013-09-201-4/+3
| | | | llvm-svn: 191098
* Fix ReST links I just added to the manualReid Kleckner2013-09-201-3/+3
| | | | llvm-svn: 191097
OpenPOWER on IntegriCloud