From 0d62ed2cf1965b21e7af1c3ba900fbd51058e17d Mon Sep 17 00:00:00 2001 From: Brian Gesiak Date: Tue, 29 Dec 2015 00:21:42 -0500 Subject: [PATCH 1/2] [line-directive] Add code header Add code headers missing from `utils/line-directive`, as per the template from #762. --- utils/line-directive | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/utils/line-directive b/utils/line-directive index 0f62f85fe7176..7f147f815063d 100755 --- a/utils/line-directive +++ b/utils/line-directive @@ -1,5 +1,21 @@ #!/usr/bin/env python -#convert line numbers in error messages according to "line directive" comments +# line-directive.py - Transform line numbers in error messages -*- python -*- +# +# This source file is part of the Swift.org open source project +# +# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors +# Licensed under Apache License v2.0 with Runtime Library Exception +# +# See http://swift.org/LICENSE.txt for license information +# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +# +# ---------------------------------------------------------------------------- +# +# Converts line numbers in error messages according to "line directive" +# comments. +# +# ---------------------------------------------------------------------------- + import sys import re import bisect From 57380faa3b6cfa80c1021b376fb069d27e51def9 Mon Sep 17 00:00:00 2001 From: Brian Gesiak Date: Tue, 29 Dec 2015 00:22:47 -0500 Subject: [PATCH 2/2] [validation-test] Add line-directive doctests `utils/line-directive` is used when building Swift (see `cmake/modules/AddSwift.cmake`), and includes some doctests. In order to make sure it continues to behave as intended, add its tests to `validation-test`. --- validation-test/Python/line-directive.swift | 1 + 1 file changed, 1 insertion(+) create mode 100644 validation-test/Python/line-directive.swift diff --git a/validation-test/Python/line-directive.swift b/validation-test/Python/line-directive.swift new file mode 100644 index 0000000000000..9f2cc8cfa5374 --- /dev/null +++ b/validation-test/Python/line-directive.swift @@ -0,0 +1 @@ +// RUN: %{python} %S/../../utils/line-directive