================
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
 
 // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the 
currently enabled floating-point options}}
 // no-inf-warning@+1 {{use of infinity is undefined behavior due to the 
currently enabled floating-point options}}
-  double y = i * numeric_limits<double>::infinity();
+  double y = i * std::numeric_limits<double>::infinity();
+
+  y = i * numeric_limits<double>::infinity(); // expected-no-diagnostics
 
 // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the 
currently enabled floating-point options}}
 // no-inf-warning@+1 {{use of infinity is undefined behavior due to the 
currently enabled floating-point options}}
-  j = numeric_limits<float>::infinity();
+  j = std::numeric_limits<float>::infinity();
+
+  j = numeric_limits<float>::infinity(); // expected-no-diagnostics
+
+  y = infinity(); // expected-no-diagnostics
+
----------------
AmrDeveloper wrote:

> None I can think of at the moment unfortunately. If i run across one, I'll 
> bring it up.

Thank you, I created a PR for the test cases, and I will continue searching for 
a good function or a place so I can create a one

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

Reply via email to