[clang] [llvm] Enable OpenCL hostcall printf (WIP) (PR #72556)

Sameer Sahasrabuddhe via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 19 22:49:37 PST 2023


================
@@ -194,6 +226,8 @@ static void locateCStrings(SparseBitVector<8> &BV, StringRef Str) {
       SpecPos += 2;
       continue;
     }
+    if (Str.find_first_of("v", SpecPos) != StringRef::npos)
----------------
ssahasra wrote:

I don't think this will work as expected. It can clearly match a "v" that occurs after the data type. For example, it is supposed to match "%v2d", but it will also match "%d v". The match should be performed inside the "Spec" substring created below. 

https://github.com/llvm/llvm-project/pull/72556


More information about the cfe-commits mailing list