================
@@ -0,0 +1,16 @@
+// RUN: %clang_analyze_cc1 -std=c++2b -verify %s \
+// RUN:   -analyzer-checker=core,debug.ExprInspection
+
+template <typename T> void clang_analyzer_dump(T);
----------------
tomasz-kaminski-sonarsource wrote:

To validate the argument indexing is correct (the function I have suggested). 
Could you add example when we construct prvalue of class type as argument:
```c++
struct Clazz {
   int x;
   int y;
   Clazz(int v) : x(v + 10), y(v + 20) {} 
};

struct StaticOp {
    static void operator[](Clazz v) {
       clang_analyzer_dump(v.x);
        clang_analyzer_dump(v.y);
    }
};

StaticOp s;
s[Calzz{10}];
```

https://github.com/llvm/llvm-project/pull/84972
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to