If the size parameter of __builtin_memcpy_inline comes from an un-instantiated template parameter current code would crash.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Sema/SemaChecking.cpp | ||
---|---|---|
1655 | Are the first two necessary ? IIRC only EvaluateKnownConstInt() does not like template-dependent stuff. |
Address comments
clang/lib/Sema/SemaChecking.cpp | ||
---|---|---|
1655 | That's right I don't think it's realistic to pass the pointers as template parameters so whatever CheckNonNullArgument is doing it will probably never end up crashing in the same way. I'll limit the fix to SizeOp then. |
Please post patches against master, not previous versions of the patch.
I think you want to check isValueDependent(); isInstantiationDependent() includes some other stuff that isn't relevant here.
Are the first two necessary ? IIRC only EvaluateKnownConstInt() does not like template-dependent stuff.