llvm-project
bcb3bd09 - [clang-tidy] Raise minimum standard level for several checks from C++98 to C++11 (#152401)

Commit
62 days ago
[clang-tidy] Raise minimum standard level for several checks from C++98 to C++11 (#152401) `modernize-replace-auto-ptr`, `modernize-use-equals-delete`, and `modernize-use-auto` use `std::unique_ptr`, `= delete`, and `auto` respectively, which are all C++11 features. The interesting bit is `modernize-use-nullptr`'s tests: - Some relied on int-to-pointer conversions that were removed in C++11. There are two variations here. First, tests like this, which become ill-formed: ```cpp const int null = 0; void * ptr = null; ``` I just deleted these cases; if they're ill-formed, we're not losing anything, right? Second, tests like this: ```cpp float * ptr = (float *)int(0.f); ``` These don't become ill-formed, but start generating a different AST. In C++98, they are `NullToPointer` conversions, but in C++11, they become generic `IntegralToPointer` conversions. I deleted these cases too, though I'm less sure here. - Folded `struct Bar` into `class A`, because those both suffer from the same false negatives.
Author
Parents
Loading