-
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
driver: add support for a more generic diagnostic handler
Signed-off-by: Luís Ferreira <[email protected]>
- Loading branch information
Showing
2 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module attr_warn_stack_size; | ||
// Test diagnostics for warnings on stack size | ||
|
||
// RUN: %ldc -wi -c %s 2>&1 | FileCheck %s | ||
|
||
import ldc.attributes; | ||
|
||
// CHECK: {{.*}}Warning: stack frame size (8) exceeds limit (1) in '_D20attr_warn_stack_size6foobarFiZf' | ||
@llvmAttr("warn-stack-size", "1") | ||
float foobar(int f) | ||
{ | ||
float _ = f; | ||
return _; | ||
} |