Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [Sema] Add some compile time _FORTIFY_SOURCE diagnostics | Erik Pilkington | 2019-03-18 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | These diagnose overflowing calls to subset of fortifiable functions. Some functions, like sprintf or strcpy aren't supported right not, but we should probably support these in the future. We previously supported this kind of functionality with -Wbuiltin-memcpy-chk-size, but that diagnostic doesn't work with _FORTIFY implementations that use wrapper functions. Also unlike that diagnostic, we emit these warnings regardless of whether _FORTIFY_SOURCE is actually enabled, which is nice for programs that don't enable the runtime checks. Why not just use diagnose_if, like Bionic does? We can get better diagnostics in the compiler (i.e. mention the sizes), and we have the potential to diagnose sprintf and strcpy which is impossible with diagnose_if (at least, in languages that don't support C++14 constexpr). This approach also saves standard libraries from having to add diagnose_if. rdar://48006655 Differential revision: https://reviews.llvm.org/D58797 llvm-svn: 356397 | ||||
* | Revert "clang/test/Driver/crash-report.c: This requires rewriter for ↵ | Alp Toker | 2014-07-16 | 1 | -1/+0 |
| | | | | | | | | | | | | | | | | | | | | | -frewrite-includes. [PR20321]" We've decided to make the core rewriter class and PP rewriters mandatory. They're only a few hundred lines of code in total and not worth supporting as a distinct build configuration, especially since doing so disables key compiler features. This reverts commit r213150. Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter." This reverts commit r213148. Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/" This reverts commit r213146. llvm-svn: 213159 | ||||
* | clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter. | NAKAMURA Takumi | 2014-07-16 | 1 | -0/+1 |
| | | | | llvm-svn: 213148 | ||||
* | Address code review comments for Wstrncat-size warning (r161440). | Anna Zaks | 2012-08-08 | 1 | -1/+6 |
| | | | | llvm-svn: 161527 | ||||
* | Do not show macro expansion in strncat warnings, which can be defined as | Anna Zaks | 2012-02-03 | 1 | -1/+12 |
| | | | | | | a builtin. llvm-svn: 149657 | ||||
* | Add a new compiler warning, which flags anti-patterns used as the size | Anna Zaks | 2012-02-01 | 1 | -0/+60 |
argument in strncat. The warning is ignored by default since it needs more qualification. TODO: The warning message and the note are messy when strncat is a builtin due to the macro expansion. llvm-svn: 149524 |