[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Fri May 16 06:03:14 PDT 2025
================
@@ -1489,6 +1490,7 @@ namespace cwg387 { // cwg387: 2.8
a = gcd(a, b);
b = gcd(3, 4);
// expected-error at -1 {{use of undeclared identifier 'gcd'}}
+ // expected-note at -2 {{perhaps `#include <numeric>` is needed?}}
----------------
Endilll wrote:
```suggestion
// expected-note at -2 {{perhaps `#include <numeric>` is needed?}}
```
https://github.com/llvm/llvm-project/pull/140247
More information about the cfe-commits
mailing list