[PATCH] D66487: Fix -Wimplicit-fallthrough warnings in regcomp.c
Nathan Huckleberry via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 12:36:41 PDT 2019
Nathan-Huckleberry marked an inline comment as done.
Nathan-Huckleberry added inline comments.
================
Comment at: llvm/lib/Support/regcomp.c:540
REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
- /* FALLTHROUGH */
+ __attribute__((fallthrough));
default:
----------------
aaron.ballman wrote:
> nickdesaulniers wrote:
> > aaron.ballman wrote:
> > > The macros in Compiler.h should be updated so that this can use `LLVM_FALLTHROUGH` instead to prevent compile errors.
> > ah, right, otherwise we get into situations where older versions of clang (or other bootstrap compilers) that don't have this feature don't understand this attribute
> Yes, as-is this would break everyone building Clang with MSVC (for instance).
I'm having problems including `Compiler.h` from a c file. I can't include a cpp header into a c file.
```
In file included from llvm/llvm-project/llvm/lib/Support/regcomp.c:51:
llvm/llvm-project/llvm/include/llvm/Support/Compiler.h:19:10: fatal error: 'new' file not found
#include <new>
^~~~~
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66487/new/
https://reviews.llvm.org/D66487
More information about the llvm-commits
mailing list